Build: Drop testing on jsdom with Node 0.10 & 0.12

Fixes gh-2841
This commit is contained in:
Michał Gołębiowski
2016-02-10 12:57:49 +01:00
parent 991e3f3e2a
commit c7431c7793
2 changed files with 2 additions and 30 deletions

View File

@@ -15,17 +15,9 @@ module.exports = function( grunt ) {
var fs = require( "fs" ),
gzip = require( "gzip-js" ),
srcHintOptions = readOptionalJSON( "src/.jshintrc" ),
newNode = !/^v0/.test( process.version ),
// Allow to skip jsdom-related tests in Node.js < 1.0.0
runJsdomTests = newNode || ( function() {
try {
require( "jsdom" );
return true;
} catch ( e ) {
return false;
}
} )();
// Skip jsdom-related tests in Node.js 0.10 & 0.12
runJsdomTests = !/^v0/.test( process.version );
if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );

View File

@@ -1,20 +0,0 @@
module.exports = function( grunt ) {
"use strict";
// Run this task to run jsdom-related tests on Node.js < 1.0.0.
grunt.registerTask( "old_jsdom", function() {
if ( !/^v0/.test( process.version ) ) {
console.warn( "The old_jsdom task doesn\'t need to be run in io.js or new Node.js" );
return;
}
// Use npm on the command-line
// There is no local npm
grunt.util.spawn( {
cmd: "npm",
args: [ "install", "jsdom@3" ],
opts: { stdio: "inherit" }
}, this.async() );
} );
};