Skip to content
This repository has been archived by the owner on Nov 18, 2017. It is now read-only.

sunflowerdeath/broccoli-karma-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broccoli-karma-plugin

Plugin for Broccoli that runs tests with Karma.

Install

npm install karma
# Also install all required karma plugins
npm install broccoli-karma-plugin

Usage

// Brocfile.js
var broccoliKarma = require('broccoli-karma-plugin')

var runTests = broccoliKarma('inputTree/', {
  files: ['**/*.js'] // Files paths are relative to input tree
  // Here any karma options
})

module.exports = runTests

To use plugin with broccoli serve you need option autoWatch: true (by default it is true).
Then on first build plugin will start karma server, and on rebuild file changes will be watched by karma.

To use with broccoli build you need to set option singleRun: true.
With this option karma starts server, runs tests and exits (so-called continious integration mode).
Plugin will wait until karma exits, and if some test will fail, task will return an error.

License

Public domain, see the LICENCE.md file.

About

Plugin for Broccoli that runs tests with Karma

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published