Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gruntjs/grunt-contrib-qunit into …
Browse files Browse the repository at this point in the history
…merge-from-upstream

* 'master' of github.com:gruntjs/grunt-contrib-qunit: (29 commits)
  Update copyright to 2014
  Style and Doc Fixes
  Squashed commit of the following:
  0.4.0
  Update grunt-lib-phantomjs to v0.5.0.
  Explicitly set files to publish to npm. Ref gruntjs/gruntjs.com#65
  Update qunit-overview.md, include CentOS dependencies. Closes asciidiscogh-49
  0.3.0 Fixes asciidiscoGH-47.
  Update to latest phantom dependency.
  Remove Gruntfile.js as main in package.json
  removing confusing error message
  Propagate error.onError events from Phantom. Closes asciidiscoGH-11.
  Update README
  Update readme to document PhantomJS OS dependencies. Fixes asciidisco#43
  Revert "Cleanup trailing whitespace in docs". Necessary for hard linebreaks.
  Cleanup trailing whitespace in docs
  Add `force` option
  Update QUnit to latest; cleanup QUnit markup
  Add new events for fail conditions, so that reporters can still report on the test
  Bump v0.2.2
  ...

Conflicts:
	CHANGELOG
	Gruntfile.js
	README.md
	package.json
	phantomjs/bridge.js
	tasks/qunit.js
  • Loading branch information
jgerigmeyer committed Mar 14, 2014
2 parents 480dbf8 + 5a276b8 commit 7c5b28a
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 deletions.
14 changes: 14 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
"Cowboy" Ben Alman (http://benalman.com/)
Tyler Kellen (http://goingslowly.com/)
Jörn Zaefferer (http://bassistance.de/)
Kyle Robinson Young (http://dontkry.com/)
Vlad Filippov (http://vladfilippov.com/)
Jarrod Overson (http://jarrodoverson.com/)
Thanasis Polychronakis (http://thanpol.as)
Richard D. Worth
Brian Chirls
Thomas Omans (http://samesake.com/)
Eliazer Braun
Lars Thorup
Nick Weingartner
Schalk Neethling
Shaker Islam
Stephen Brandwood
14 changes: 12 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
v0.5.0:
date: 2014-01-27
changes:
- Add ability to hide PhantomJS console output.
v0.4.0:
date: 2014-01-17
changes:
- Update grunt-lib-phantomjs to v0.5.0.
- Explicitly set files to publish to npm. Ref gruntjs/gruntjs.com#65.
- Update qunit-overview.md, include CentOS dependencies. Closes gh-49.
v0.3.0:
date: 2013-09-29
changes:
Expand All @@ -9,13 +19,13 @@ v0.3.0:
- Remove confusing error message.
v0.2.2:
date: 2013-06-06
changes:
changes:
- Warn if no assertions ran in a single test.
- Spaces instead of newlines for clickable urls.
- Wrap bridge.js in a IIFE.
v0.2.1:
date: 2013-04-05
changes:
changes:
- Update to use PhantomJS 1.9.0. Fixes PhantomJS not found errors.
v0.2.0:
date: 2013-02-28
Expand Down
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* grunt-contrib-qunit
* http://gruntjs.com/
*
* Copyright (c) 2013 "Cowboy" Ben Alman, contributors
* Copyright (c) 2014 "Cowboy" Ben Alman, contributors
* Licensed under the MIT license.
*/

Expand Down Expand Up @@ -109,4 +109,4 @@ module.exports = function(grunt) {
// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);

};
};
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 "Cowboy" Ben Alman, contributors
Copyright (c) 2014 "Cowboy" Ben Alman, contributors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-qunit-istanbul",
"description": "Run QUnit unit tests in a headless PhantomJS instance and create coverage reports with istanbul.",
"version": "0.3.0",
"version": "0.5.0-pre",
"homepage": "https://github.com/asciidisco/grunt-qunit-istanbul",
"author": {
"name": "Grunt Team",
Expand All @@ -27,7 +27,7 @@
"test": "grunt test"
},
"dependencies": {
"grunt-lib-phantomjs-istanbul": "~0.4.0",
"grunt-lib-phantomjs-istanbul": "~0.5.0",
"rimraf": "~2.2.2",
"istanbul": "~0.1.44"
},
Expand All @@ -43,5 +43,10 @@
},
"keywords": [
"gruntplugin"
],
"files": [
"tasks",
"LICENSE-MIT",
"phantomjs"
]
}
2 changes: 1 addition & 1 deletion phantomjs/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* grunt-contrib-qunit
* http://gruntjs.com/
*
* Copyright (c) 2013 "Cowboy" Ben Alman, contributors
* Copyright (c) 2014 "Cowboy" Ben Alman, contributors
* Licensed under the MIT license.
*/

Expand Down
11 changes: 7 additions & 4 deletions tasks/qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ module.exports = function(grunt) {
grunt.event.emit('qunit.error.onError', msg, stackTrace);
});


// Pass-through console.log statements.
phantomjs.on('console', console.log.bind(console));

grunt.registerMultiTask('qunit', 'Run QUnit unit tests in a headless PhantomJS instance.', function() {
// Merge task-specific and/or target-specific options with these defaults.
options = this.options({
Expand All @@ -177,6 +173,8 @@ module.exports = function(grunt) {
// Explicit non-file URLs to test.
urls: [],
force: false,
// Connect phantomjs console output to grunt output
console: true,
// Explicitly define all coverage options (as empty)
coverage: {
src: []
Expand All @@ -192,6 +190,11 @@ module.exports = function(grunt) {
// Reset status.
status = {failed: 0, passed: 0, total: 0, duration: 0, coverage: '-'};

// Pass-through console.log statements.
if(options.console) {
phantomjs.on('console', console.log.bind(console));
}

// expand files for coverage
if (options.coverage && options.coverage.src && options.coverage.src.length) {
options.coverage.include = grunt.file.expand(options.coverage.src);
Expand Down

0 comments on commit 7c5b28a

Please sign in to comment.