denar90 / karma-brunch

Adds karma support to brunch
3 stars 2 forks source link

Build Status

karma-brunch

Adds karma support to brunch.

Usage

Install the plugin via npm with npm install --save karma-brunch.

Or, do manual install:

And run brunch with the test environment. For instance brunch watch --env=test

Config example with karma


module.exports = {
  files: {
    javascripts: {
      joinTo: {
        'vendor.js': /^(?!app|test)/,
        'app.js': /^app/,
        'test.js': /^test/
      }
    },
    stylesheets: {joinTo: 'app.css'},
  },
  modules: {
    autoRequire: {
      'test.js': ['test/specs']
    }
  },
  plugins: {
    babel: {presets: ['es2015']},
    karma: {
      singleRun: true,
      browsers: ['PhantomJS'],
      frameworks: ['mocha', 'chai'],
      files: [
        "public/test.js"
      ]
    }
  }
};

Supported karma frameworks

License

The MIT License (MIT)