nkw

node-karma-wrapper

Karma test runner wrapper

Showing:

Popularity

Downloads/wk

0

GitHub Stars

3

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

node-karma-wrapper Build Status NPM version

I'm just wrapping the the karma public API here.

Information

Packagenode-karma-wrapper
Description Karma test runner helper
Node Version >= 0.8

Usage

var karma = require('node-karma-wrapper');

// Preconfig you server
var aKarmaTestServer = karma({ configFile : './test/karma.conf.js');

// Then run once
aKarmaTestServer.simpleRun();

// Run in background
aKarmaTestServer.inBackground();

// Normal launch
aKarmaTestServer.start();

// Run the tests using the already started karma server
aKarmaTestServer.run();

Api

karma(configs)

Defines a karma server with a specific configuration (see the official api). Return a « Karma Helper Object »

« Karma Helper Object » methods

kho.start([callback])

Equivalent of karma start.

kho.run(callback)

Equivalent of karma run.

kho.inBackground([callback])

On continuous integration you can start the karma server without blocking the main process and without logging anything.

kho.simpleRun([callback])

Equivalent of karma start with the singleRun option on.

Travis CI trick

Here is a way to run specific config on Travis :

var assign = require('lodash.assign');

// TRAVIS TRICKS
function testConfig(configFile, customOptions){
  var options = { configFile: configFile };
  var travisOptions = process.env.TRAVIS && { browsers: [ 'Firefox', 'PhantomJS'], reporters: ['dots'] };
  return assign(options, customOptions, travisOptions);
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Tutorials

No tutorials found
Add a tutorial