Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multitask Support #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ In your project's Gruntfile, add a section named `qunit_junit` to the data objec

```js
grunt.initConfig({

qunit_junit: {
options: {
// Task-specific options go here.
all: {
options: {
// Task-specific options go here.
}
}
},
})
Expand Down Expand Up @@ -124,7 +125,7 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.

## Release History

* 0.3.0 added ability to provide custom url, module and test namers.
* 0.3.0 added ability to provide custom url, module and test namers
* 0.2.0 updated `grunt-contrib-qunit` to 0.5.2 to report actual test durations.
* 0.1.1 added time attribute to output with dummy value, to aid compatibility
* 0.1.0 is available for general use.
Expand Down
2 changes: 1 addition & 1 deletion tasks/qunit-junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ module.exports = function (grunt) {
});


grunt.registerTask('qunit_junit',
grunt.registerMultiTask('qunit_junit',
'Log JUnit style XML reports for QUnit tests', function () {
var options = this.options({
dest: '_build/test-reports',
Expand Down
4 changes: 2 additions & 2 deletions test/tasks/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = function (grunt) {
qunitConfig.options.urls = settings.urls;
}
grunt.log.ok("Performing setup for " + name);
grunt.config('qunit_junit.options', settings.options);
grunt.config('qunit_junit.' + name + '.options', settings.options);
grunt.config.set('qunit.all', qunitConfig);
};

Expand Down Expand Up @@ -220,7 +220,7 @@ module.exports = function (grunt) {
grunt.config('harness.teardown_' + name,
_.bind(teardownSuite, null, name, settings, errors[name]));

grunt.task.run('harness:setup_' + name, 'qunit_junit', 'qunit:all',
grunt.task.run('harness:setup_' + name, 'qunit_junit:' + name, 'qunit:all',
'harness:teardown_' + name);
});

Expand Down