{"library":"nutra-jasmine-coverage-babel-preset","title":"nutra-jasmine-coverage-babel-preset","description":"A preset for the N.U.T.R.A. unit test runner combining Jasmine, Babel transpilation, Istanbul code coverage, and CommonJS module loading. Current stable version is 0.0.10. It simplifies configuration by bundling these tools into a single preset. Designed specifically for the N.U.T.R.A. test runner ecosystem, it is not a general-purpose tool.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install nutra-jasmine-coverage-babel-preset"],"cli":null},"imports":["// nutra.config.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['nutra-jasmine'],\n    files: ['test/specs/**/*.js', 'src/**/*.js'],\n    preprocessors: {\n        'test/specs/**/*.js': ['nutra-babel'],\n        'src/**/*.js': ['nutra-babel', 'nutra-coverage']\n    },\n    reporters: ['nutra-coverage']\n  });\n};"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install preset\nnpm install --save-dev nutra nutra-jasmine-coverage-babel-preset\n\n// Create nutra.config.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['nutra-jasmine'],\n    files: ['test/specs/**/*.js', 'src/**/*.js'],\n    preprocessors: {\n        'test/specs/**/*.js': ['nutra-babel'],\n        'src/**/*.js': ['nutra-babel', 'nutra-coverage']\n    },\n    reporters: ['nutra-coverage'],\n    babelOptions: {\n      configFile: './.babelrc'\n    },\n    coverageOptions: {\n      reporters: [{ type: 'html', subdir: '.' }]\n    }\n  });\n};\n\n// Write a sample spec\n// test/specs/exampleSpec.js\ndescribe('Sample', function() {\n  it('should pass', function() {\n    expect(1 + 1).toBe(2);\n  });\n});\n\n// Run tests\nnpx nutra run","lang":"javascript","description":"Installs the preset, creates a basic nutra.config.js configuration with Jasmine, Babel, and Istanbul coverage, writes a sample spec, and runs the test suite.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}