Skip to content

Commit ef1578f

Browse files
committed
Build: Extract a test:prepare task (some custom build tests require it)
1 parent 6def4e7 commit ef1578f

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ npm-debug.log*
2121
/node_modules
2222

2323
/test/data/core/jquery-iterability-transpiled.js
24+
/test/data/qunit-fixture.js

Gruntfile.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function( grunt ) {
4141
retainLines: true,
4242
plugins: [ "@babel/transform-for-of" ]
4343
},
44-
nodeSmokeTests: {
44+
tests: {
4545
files: {
4646
"test/data/core/jquery-iterability-transpiled.js":
4747
"test/data/core/jquery-iterability-transpiled-es6.js"
@@ -314,7 +314,13 @@ module.exports = function( grunt ) {
314314
"karma:jsdom"
315315
] );
316316

317+
grunt.registerTask( "test:prepare", [
318+
"qunit_fixture",
319+
"babel:tests"
320+
] );
321+
317322
grunt.registerTask( "test", [
323+
"test:prepare",
318324
"test:fast",
319325
"test:slow"
320326
] );
@@ -336,7 +342,7 @@ module.exports = function( grunt ) {
336342
"uglify",
337343
"remove_map_comment",
338344
"dist:*",
339-
"qunit_fixture",
345+
"test:prepare",
340346
"eslint:dist",
341347
"test:fast",
342348
"compare_size"

build/tasks/node_smoke_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = ( grunt ) => {
44
const fs = require( "fs" );
55
const spawnTest = require( "./lib/spawn_test.js" );
66
const testsDir = "./test/node_smoke_tests/";
7-
const nodeSmokeTests = [ "babel:nodeSmokeTests" ];
7+
const nodeSmokeTests = [];
88

99
// Fire up all tests defined in test/node_smoke_tests/*.js in spawned sub-processes.
1010
// All the files under test/node_smoke_tests/*.js are supposed to exit with 0 code

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
"test:browser": "grunt && grunt karma:main",
7575
"test:esmodules": "grunt && grunt karma:esmodules",
7676
"test:amd": "grunt && grunt karma:amd",
77-
"test:no-deprecated": "grunt custom:-deprecated && grunt karma:main",
78-
"test:slim": "grunt custom:-ajax,-effects && grunt karma:main",
77+
"test:no-deprecated": "grunt test:prepare && grunt custom:-deprecated && grunt karma:main",
78+
"test:slim": "grunt test:prepare && grunt custom:-ajax,-effects && grunt karma:main",
7979
"test": "npm run test:slim && npm run test:no-deprecated && grunt && grunt test:slow && grunt karma:main && grunt karma:esmodules && grunt karma:amd",
8080
"jenkins": "npm run test:browserless"
8181
},

test/data/qunit-fixture.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)