aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-03-04 18:30:51 +0100
committerGitHub <noreply@github.com>2019-03-04 18:30:51 +0100
commit9cb124ed00aad8ac47690e31ad0bb8c3c365663d (patch)
tree4cfbdd63f3dbe87398b8bde41de1f2e65ed3c4f2 /build
parentc10945d0e15c5048ae8b5b7e3f8241ad27671a7c (diff)
downloadjquery-9cb124ed00aad8ac47690e31ad0bb8c3c365663d.tar.gz
jquery-9cb124ed00aad8ac47690e31ad0bb8c3c365663d.zip
Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test
So far, we've been testing that jQuery element iteration works with polyfilled Symbol & transpiled for-of via a Node test with jsdom with the Symbol global removed. Unfortunately, jsdom now requires Symbol to be present for its internal functionality so such a test is no longer possible. Instead, it's been migrated to an iframe test with transpiled JavaScript. This PR also enables us to use ECMAScript 2017 or newer in Node.js code. Closes gh-4305
Diffstat (limited to 'build')
-rw-r--r--build/tasks/node_smoke_tests.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/build/tasks/node_smoke_tests.js b/build/tasks/node_smoke_tests.js
index bd0a9150e..e3d69db88 100644
--- a/build/tasks/node_smoke_tests.js
+++ b/build/tasks/node_smoke_tests.js
@@ -1,11 +1,11 @@
-module.exports = function( grunt ) {
+module.exports = ( grunt ) => {
"use strict";
- var fs = require( "fs" ),
- spawnTest = require( "./lib/spawn_test.js" ),
- testsDir = "./test/node_smoke_tests/",
- nodeSmokeTests = [ "babel:nodeSmokeTests" ];
+ const fs = require( "fs" );
+ const spawnTest = require( "./lib/spawn_test.js" );
+ const testsDir = "./test/node_smoke_tests/";
+ const nodeSmokeTests = [ "babel:nodeSmokeTests" ];
// Fire up all tests defined in test/node_smoke_tests/*.js in spawned sub-processes.
// All the files under test/node_smoke_tests/*.js are supposed to exit with 0 code
@@ -14,15 +14,15 @@ module.exports = function( grunt ) {
// each other, e.g. so that they don't share the require cache.
fs.readdirSync( testsDir )
- .filter( function( testFilePath ) {
- return fs.statSync( testsDir + testFilePath ).isFile() &&
- /\.js$/.test( testFilePath );
- } )
- .forEach( function( testFilePath ) {
- var taskName = "node_" + testFilePath.replace( /\.js$/, "" );
+ .filter( ( testFilePath ) =>
+ fs.statSync( testsDir + testFilePath ).isFile() &&
+ /\.js$/.test( testFilePath )
+ )
+ .forEach( ( testFilePath ) => {
+ const 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 );