]> source.dussan.org Git - jquery.git/commitdiff
Tests: Make Node tests work for paths with spaces in them
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Wed, 18 Oct 2017 15:44:50 +0000 (17:44 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Oct 2017 15:44:50 +0000 (17:44 +0200)
Without this patch Jenkins tests fail as jQuery job names there contain spaces,
e.g. "jQuery Core".

Closes gh-3821

build/tasks/node_smoke_tests.js
build/tasks/promises_aplus_tests.js

index 157aa80af27349a4c05906ff8f0ad8f925b4e824..bd0a9150e0b3574734f4b61df1bc3cbd9c004b59 100644 (file)
@@ -22,7 +22,7 @@ module.exports = function( grunt ) {
                        var taskName = "node_" + testFilePath.replace( /\.js$/, "" );
 
                        grunt.registerTask( taskName, function() {
-                               spawnTest( this.async(), "node test/node_smoke_tests/" + testFilePath );
+                               spawnTest( this.async(), "node \"test/node_smoke_tests/" + testFilePath + "\"" );
                        } );
 
                        nodeSmokeTests.push( taskName );
index 5bd20ecdc3792301fa363cdc4621328a2ee7f6de..7f815344833450fcecd8e08d825377428ab99e3b 100644 (file)
@@ -10,7 +10,7 @@ module.exports = function( grunt ) {
 
        grunt.registerTask( "promises_aplus_tests:deferred", function() {
                spawnTest( this.async(),
-                       __dirname + "/../../node_modules/.bin/promises-aplus-tests" +
+                       "\"" + __dirname + "/../../node_modules/.bin/promises-aplus-tests\"" +
                                " test/promises_aplus_adapters/deferred.js" +
                                " --timeout " + timeout
                );
@@ -18,7 +18,7 @@ module.exports = function( grunt ) {
 
        grunt.registerTask( "promises_aplus_tests:when", function() {
                spawnTest( this.async(),
-                       __dirname + "/../../node_modules/.bin/promises-aplus-tests" +
+                       "\"" + __dirname + "/../../node_modules/.bin/promises-aplus-tests\"" +
                                " test/promises_aplus_adapters/when.js" +
                                " --timeout " + timeout
                );