diff --git a/tests/bootstrap.js b/tests/bootstrap.js index efa690616..6dc537c44 100644 --- a/tests/bootstrap.js +++ b/tests/bootstrap.js @@ -13,8 +13,8 @@ * uncompressed mode. * * You must use a \n'); } else { diff --git a/tests/blockly.mjs b/tests/bootstrap_done.mjs similarity index 73% rename from tests/blockly.mjs rename to tests/bootstrap_done.mjs index e447cd3c2..a4ee8818b 100644 --- a/tests/blockly.mjs +++ b/tests/bootstrap_done.mjs @@ -20,20 +20,17 @@ * * See tests/playground.html for example usage. */ - -let Blockly; - if (window.BlocklyLoader) { - // Uncompiled mode. Use top-level await + // Uncompressed mode. Use top-level await // (https://v8.dev/features/top-level-await) to block loading of // this module until goog.bootstrap()ping of Blockly is finished. await window.BlocklyLoader.done; - Blockly = globalThis.Blockly; + // Note that this module previously did an export default of the + // value returned by the BlocklyLoader.done promise. This was + // changed in PR #5995 because library blocks and generators cannot + // be accessed via that the core/blockly.js exports object. } else if (window.Blockly) { - // Compiled mode. Retrieve the pre-installed Blockly global. - Blockly = globalThis.Blockly; + // Compiled mode. Nothing more to do. } else { throw new Error('neither window.Blockly nor window.BlocklyLoader found'); } - -export default Blockly; diff --git a/tests/generators/index.html b/tests/generators/index.html index 49a9d5f9d..69badeed1 100644 --- a/tests/generators/index.html +++ b/tests/generators/index.html @@ -206,8 +206,9 @@ function changeIndex() { } diff --git a/tests/mocha/index.html b/tests/mocha/index.html index e63dc1f6a..10fe5ed45 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -180,7 +180,7 @@