jasmine-group
Jasmine plugin to run JavaScript unit tests by groups and priorities. Tests will be selected for execution based on groups' setting.
Motivation
Existing issues:
- Unlike JUnit (@Category) and PHPUnit (@group), Jasmine JavaScript unit testing does not support grouping test;
- Users have to manually set
fdescribe
to focus on several related test cases; - The sequence of execution is restricted in the names of test cases. Users are hard to control the execution order.
Requirements: - Provide feature for grouping tests;
- Provide feature to run specific suite of tests easier;
- Provide feature to define the execution order easier.
Installation
You can simple do it by running following command inside of your project directory:
npm install jasmine-group --save-dev
Please note: This plugin is designed for running with Karma
, the functionality may not working if only install this plugin.
Also if you have 'karma-jasmine-group'
in your package.json
devDependencies list, this plugin will be installed automatically.
See karma-jasmine-group for more details.
Configuration
Please see karma-jasmine-group for the settings in your Karma configuration.
Usage
Once you have configured your Karma configuration, you can simple to replace 'describe' with 'gdescribe' and add the group name as the first parameter:
;
Contributors
Ruizhi Wang: crystalplan999@gmail.com
Felice Geracitano: felice.geracitano@gmail.com
License
MIT license, please see LICENSE
file for details.