Skip to content

Karma plugin that reports Jasmine order seed that was used to randomize specs in Karma Runner

License

Notifications You must be signed in to change notification settings

caplin/karma-jasmine-order-reporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karma-jasmine-order-reporter

Reports Jasmine order seed that was used to randomize specs in Karma Runner

npm version

Use this plugin to get information about Jasmine generated seed. It reports seed info twice:

  1. When Jasmine started:
JASMINE ORDER REPORTER: Started with seed 12345
  1. 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.

Installation

$ npm install karma-jasmine-order-reporter --save-dev

or

$ yarn add karma-jasmine-order-reporter --dev

Usage

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
  });
};

License

MIT Licensed

About

Karma plugin that reports Jasmine order seed that was used to randomize specs in Karma Runner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%