Created
December 11, 2016 21:22
-
-
Save maksimr/aa8444db54b4897df1ed0d75007a4840 to your computer and use it in GitHub Desktop.
Karma jasmine random order seed reporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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