Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 770 Bytes

jasmine-npm-configuration.md

File metadata and controls

23 lines (17 loc) · 770 Bytes

Use jasmine-spec-reporter with Node

The jasmine-spec-reporter can be used to enhance your jasmine node tests execution report.

Configuration

Create a jasmine-runner.js file with the following content:

var Jasmine = require('jasmine');
var SpecReporter = require('jasmine-spec-reporter');
var noop = function() {};

var jrunner = new Jasmine();
jrunner.configureDefaultReporter({print: noop});    // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter());   // add jasmine-spec-reporter
jrunner.loadConfigFile();                           // load jasmine.json configuration
jrunner.execute();

Then run your tests with:

node jasmine-runner.js