diff --git a/tests/bootstrap.js b/tests/bootstrap.js index fe345d2cc..0310b32bf 100644 --- a/tests/bootstrap.js +++ b/tests/bootstrap.js @@ -58,6 +58,11 @@ // from somewhere in tests/. root: window.location.href.replace(/\/tests\/.*$/, '/'), + // List of deps files to load. Paths relative to root. + depsFiles: [ + 'build/deps.js', + ], + // List of goog.modules to goog.require. requires: [ 'Blockly', @@ -69,7 +74,8 @@ 'Blockly.Python.all', ], - // List of scripts to load in compressed mode, instead of requires. + // List of scripts to load in compressed mode, instead of + // requires. Paths relative to root. compressedScripts: [ 'blockly_compressed.js', 'blocks_compressed.js', @@ -82,6 +88,7 @@ // Additional scripts to be loaded after Blockly is loaded, // whether Blockly is loaded from compressed or uncompressed. + // Paths relative to root. additionalScripts: [ 'msg/messages.js', ], @@ -112,10 +119,15 @@ // goog.module). document.write( ''); - // Load dependency graph info from build/deps.js. To update - // deps.js, run `npm run build:deps`. - document.write( - ''); + + // Load dependency graph info from the specified deps files - + // typically just build/deps.js. To update deps after changing + // any module's goog.requires / imports, run `npm run build:deps`. + for (let i = 0; i < options.depsFiles.length; i++) { + document.write( + ''); + } const requiresString = options.requires.map(quote).join(); const scriptsString = options.additionalScripts.map(quote).join(); diff --git a/tests/mocha/.mocharc.js b/tests/mocha/.mocharc.js index 3c156db3e..0928b25d2 100644 --- a/tests/mocha/.mocharc.js +++ b/tests/mocha/.mocharc.js @@ -2,6 +2,5 @@ module.exports = { ui: 'tdd', - file: '../blockly_uncompressed.js', reporter: 'landing' }; diff --git a/tests/mocha/index.html b/tests/mocha/index.html index c3caf1469..e63dc1f6a 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -5,9 +5,6 @@ Mocha Tests for Blockly - - -