Skip to content

Instantly share code, notes, and snippets.

@maksimr
Created December 11, 2016 21:22
Show Gist options
  • Save maksimr/aa8444db54b4897df1ed0d75007a4840 to your computer and use it in GitHub Desktop.
Save maksimr/aa8444db54b4897df1ed0d75007a4840 to your computer and use it in GitHub Desktop.
Karma jasmine random order seed reporter
module.exports = function(config) {
config.set({
plugins: [
'karma-*', {
'reporter:inline-jasmine-seed': ['type', function(baseReporterDecorator) {
baseReporterDecorator(this);
this.renderBrowser =
this.onBrowserError =
this.onBrowserLog =
this.onSpecComplete =
this.onRunComplete =
this.specFailure =
this.specSuccess =
this.specSkipped = function() {};
this.onBrowserComplete = function(browser, result) {
if (result.order && result.order.random && result.order.seed) {
this.write('%s: Randomized with seed %s\n', browser, result.order.seed);
}
};
}]
}
],
client: {
jasmine: {
random: true
}
},
reporters: ['progress', 'inline-jasmine-seed']
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment