Reports Jasmine order seed that was used to randomize specs in Karma Runner
Use this plugin to get information about Jasmine
generated seed. It reports seed info twice:
- When
Jasmine
started:
JASMINE ORDER REPORTER: Started with seed 12345
- When
Jasmine
finished spec run:
JASMINE ORDER REPORTER: Done with seed 12345
This plugin can be useful in scenarios when you have flaky tests, that are failing only on specific seeds.
Also it will report seed on Jasmine
start regardless of Karma
or browser crash while tests run.
$ npm install karma-jasmine-order-reporter --save-dev
or
$ yarn add karma-jasmine-order-reporter --dev
Update your karma.conf.js
file as follows:
module.exports = function(config) {
config.set({
// code omitted for brevity
plugins: [
// other Karma Plugins
'karma-jasmine-order-reporter' or `require('karma-jasmine-order-reporter')`
],
reporters: [
// other Karma Reporters
'jasmine-order'
],
disableJasmineOrderStandardLogging: true // Enable this when using with order loggers that log output to the console, to prevent duplicate loggin
});
};
MIT Licensed