Merge commit '8cceb8b9d955686a4a435224304a24ce2896c0c3'
Conflicts: package.json
This commit is contained in:
commit
0fdf44b052
@ -1,3 +1,9 @@
|
||||
v0.4.2:
|
||||
date: 2013-04-03
|
||||
changes:
|
||||
- bumped grunt-lib-phantomjs to 0.3.0/1.9 (closes #45)
|
||||
- merged #38, #51
|
||||
- addressed #40, #43, #48, #45
|
||||
v0.4.0:
|
||||
date: 2013-03-08
|
||||
changes:
|
||||
|
23
README.md
23
README.md
@ -83,6 +83,18 @@ Type: `String|Array`
|
||||
|
||||
*Minimatch* - CSS files that get loaded after the jasmine.css
|
||||
|
||||
#### options.version
|
||||
Type: `String`
|
||||
Default: '1.3.1'
|
||||
|
||||
This is the jasmine-version which will be used. currently available versions are:
|
||||
|
||||
* 1.0.0
|
||||
* 1.1.0
|
||||
* 1.2.0
|
||||
* 1.3.0
|
||||
* 1.3.1
|
||||
|
||||
#### options.outfile
|
||||
Type: `String`
|
||||
Default: `_SpecRunner.html`
|
||||
@ -90,6 +102,12 @@ Default: `_SpecRunner.html`
|
||||
The auto-generated specfile that phantomjs will use to run your tests.
|
||||
Automatically deleted upon normal runs
|
||||
|
||||
#### options.keepRunner
|
||||
Type: `Boolean`
|
||||
Default: `false`
|
||||
|
||||
Prevents the auto-generated specfile used to run your tests from being automatically deleted.
|
||||
|
||||
#### options.junit.path
|
||||
Type: `String`
|
||||
Default: undefined
|
||||
@ -185,7 +203,7 @@ grunt.initConfig({
|
||||
src: 'src/**/*.js',
|
||||
options: {
|
||||
specs: 'spec/*Spec.js',
|
||||
helpers: 'spec/*Helper.js'
|
||||
helpers: 'spec/*Helper.js',
|
||||
template: 'custom.tmpl'
|
||||
}
|
||||
}
|
||||
@ -218,6 +236,7 @@ for more information on the RequireJS template.
|
||||
|
||||
## Release History
|
||||
|
||||
* 2013-04-02 v0.4.2 bumped grunt-lib-phantomjs to 0.3.0/1.9 (closes merged addressed
|
||||
* 2013-03-07 v0.4.0 bumped grunt-lib-phantomjs to 0.2.0/1.8 allowed spec/vendor/helper list to return non-matching files (e.g. for remote, http) merged merged
|
||||
* 2013-02-23 v0.3.3 Added better console output (via Gabor Kiss @Neverl)
|
||||
* 2013-02-16 v0.3.2 Ensure Gruntfile.js is included on npm.
|
||||
@ -234,4 +253,4 @@ for more information on the RequireJS template.
|
||||
|
||||
Task submitted by [Jarrod Overson](http://jarrodoverson.com)
|
||||
|
||||
*This file was generated on Sun Mar 10 2013 22:14:38.*
|
||||
*This file was generated on Fri Apr 12 2013 19:45:58.*
|
||||
|
@ -29,7 +29,7 @@ grunt.initConfig({
|
||||
src: 'src/**/*.js',
|
||||
options: {
|
||||
specs: 'spec/*Spec.js',
|
||||
helpers: 'spec/*Helper.js'
|
||||
helpers: 'spec/*Helper.js',
|
||||
template: 'custom.tmpl'
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,18 @@ Type: `String|Array`
|
||||
|
||||
*Minimatch* - CSS files that get loaded after the jasmine.css
|
||||
|
||||
## options.version
|
||||
Type: `String`
|
||||
Default: '1.3.1'
|
||||
|
||||
This is the jasmine-version which will be used. currently available versions are:
|
||||
|
||||
* 1.0.0
|
||||
* 1.1.0
|
||||
* 1.2.0
|
||||
* 1.3.0
|
||||
* 1.3.1
|
||||
|
||||
## options.outfile
|
||||
Type: `String`
|
||||
Default: `_SpecRunner.html`
|
||||
@ -33,6 +45,12 @@ Default: `_SpecRunner.html`
|
||||
The auto-generated specfile that phantomjs will use to run your tests.
|
||||
Automatically deleted upon normal runs
|
||||
|
||||
## options.keepRunner
|
||||
Type: `Boolean`
|
||||
Default: `false`
|
||||
|
||||
Prevents the auto-generated specfile used to run your tests from being automatically deleted.
|
||||
|
||||
## options.junit.path
|
||||
Type: `String`
|
||||
Default: undefined
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "grunt-contrib-jasmine",
|
||||
"description": "Run jasmine specs headlessly through PhantomJS.",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"homepage": "https://github.com/gruntjs/grunt-contrib-jasmine",
|
||||
"author": {
|
||||
"name": "Grunt Team",
|
||||
@ -28,14 +28,15 @@
|
||||
"test": "grunt test"
|
||||
},
|
||||
"dependencies": {
|
||||
"grunt-lib-phantomjs": "git://github.com/HBehrens/grunt-lib-phantomjs.git#20f675c331893ee4b1a328ae7a1ce82d75099e50",
|
||||
"grunt-lib-phantomjs": "~0.3.0",
|
||||
"rimraf": "~2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-contrib-internal": "~0.4.0",
|
||||
"grunt-contrib-nodeunit": "~0.1.2",
|
||||
"grunt-contrib-jshint": "~0.2.0",
|
||||
"grunt": "~0.4.0"
|
||||
"grunt": "~0.4.0",
|
||||
"grunt-contrib-connect": "~0.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"grunt": "~0.4.0"
|
||||
|
@ -21,15 +21,7 @@ module.exports = function(grunt) {
|
||||
|
||||
var junitTemplate = __dirname + '/jasmine/templates/JUnit.tmpl';
|
||||
|
||||
var status = {
|
||||
specs : 0,
|
||||
failed : 0,
|
||||
passed : 0,
|
||||
total : 0,
|
||||
skipped : 0,
|
||||
duration : 0,
|
||||
log : ''
|
||||
};
|
||||
var status = {};
|
||||
|
||||
grunt.registerMultiTask('jasmine', 'Run jasmine specs headlessly through PhantomJS.', function() {
|
||||
|
||||
@ -69,11 +61,15 @@ module.exports = function(grunt) {
|
||||
|
||||
var done = this.async();
|
||||
phantomRunner(options, function(err,status) {
|
||||
var success = !err && status.failed === 0;
|
||||
|
||||
if (err) grunt.log.error(err);
|
||||
if (status.failed === 0) grunt.log.ok('0 failures');
|
||||
else grunt.log.error(status.failed + ' failures');
|
||||
|
||||
options.keepRunner = options.keepRunner || !success;
|
||||
teardown(options);
|
||||
done(!err && status.failed === 0);
|
||||
done(success);
|
||||
});
|
||||
|
||||
});
|
||||
@ -88,6 +84,7 @@ module.exports = function(grunt) {
|
||||
var file = options.outfile;
|
||||
|
||||
if (options.host) {
|
||||
if (!(/\/$/).test(options.host)) options.host = options.host + '/';
|
||||
file = options.host + options.outfile;
|
||||
}
|
||||
|
||||
@ -103,8 +100,8 @@ module.exports = function(grunt) {
|
||||
}
|
||||
|
||||
function teardown(options) {
|
||||
if (fs.statSync(options.outfile).isFile()) fs.unlink(options.outfile);
|
||||
jasmine.cleanTemp();
|
||||
if (!options.keepRunner && fs.statSync(options.outfile).isFile()) fs.unlink(options.outfile);
|
||||
if (!options.keepRunner) jasmine.cleanTemp();
|
||||
|
||||
// Have to explicitly unregister nested wildcards. Need to file a bug for EventEmitter2
|
||||
phantomjs.removeAllListeners('*');
|
||||
@ -116,6 +113,16 @@ module.exports = function(grunt) {
|
||||
function setup(options) {
|
||||
var thisRun = {};
|
||||
|
||||
status = {
|
||||
specs : 0,
|
||||
failed : 0,
|
||||
passed : 0,
|
||||
total : 0,
|
||||
skipped : 0,
|
||||
duration : 0,
|
||||
log : ''
|
||||
};
|
||||
|
||||
phantomjs.on('fail.timeout',function(){
|
||||
grunt.log.writeln();
|
||||
grunt.warn('PhantomJS timed out, possibly due to an unfinished async spec.', 90);
|
||||
|
4
test/fixtures/pivotal/SpecRunner.html
vendored
4
test/fixtures/pivotal/SpecRunner.html
vendored
@ -9,11 +9,11 @@
|
||||
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine.js"></script>
|
||||
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine-html.js"></script>
|
||||
|
||||
<!-- include source files here... -->
|
||||
<!-- include spec files here... -->
|
||||
<script type="text/javascript" src="spec/SpecHelper.js"></script>
|
||||
<script type="text/javascript" src="spec/PlayerSpec.js"></script>
|
||||
|
||||
<!-- include spec files here... -->
|
||||
<!-- include source files here... -->
|
||||
<script type="text/javascript" src="src/Player.js"></script>
|
||||
<script type="text/javascript" src="src/Song.js"></script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user