Karma adapter for Jasmine plugin to run JavaScript unit tests by groups and priorities.
The easiest way is to keep karma-jasmine-group
as a devDependency in your package.json
.
{
"devDependencies": {
"jasmine-core": "^2.2.0",
"karma": "^0.12.31",
"karma-jasmine": "^0.3.5",
"karma-jasmine-group": "^1.0.4"
}
}
You can simple do it by running following command inside of your project directory:
npm install karma-jasmine-group --save-dev
- Add
'karma-jasmine-group'
to theframeworks
key in your Karma configuration, before'jasmine'
; - Add a new key
groupsConfig
with a list of groups in your Karma configuration.
Please Note: the test groups will be run in same order as you provided in the list.
module.exports = function(config) {
config.set({
frameworks: ['karma-jasmine-group', 'jasmine'],
groupsConfig: ['group1', 'group2', 'group3']
});
}
To use this plug-in you will need to define groups in your tests, for details and installation, please see jasmine-group.
jasmine-group
plug-in will provide support using 'gdescribe' to set a group in your test case
example:
gdescribe('group1', 'TestSuit description', function() {
it('TestCase description', function() {
......
});
});
Ruizhi Wang: [email protected]
Felice Geracitano: [email protected]
MIT license, please see LICENSE
file for details.