A new Jasmine reporter.
Execute your Jasmine specs from the command-line, using Buster.
In your buster.js configuration file, be sure to set the following:
var config = module.exports;
require('buster').stackFilter.filters.push('jasmine.js');
config['your project'] = {
env: 'browser',
autoRun: 'false',
src: ['your source files'],
testHelpers: ['/path/to/jasmine-buster.js'],
specs: ['your spec files']
}
You will also need to set the following somewhere in your test-only code base:
var env = jasmine.getEnv(),
jasmineBuster = new jasmine.BusterReporter();
env.addReporter(jasmineBuster);
Don't forget to env.execute()
once ready.
See the basic examples included in this repository, otherwise see how testr.js bends the rules.
Remove the stack trace noise and see exactly where an error began. The filters
code above removes any jasmine-related entries from an error, leaving it immediately clear where an error has occurred. Compare the screenshot above with this, from the standard Jasmine HTML Reporter:
- Deferred cases are not reported to Buster
- Only the first failure of an expectation will be reported per spec