diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index d6cc38b7c66..0d751775002 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -22,7 +22,7 @@ const closureCompiler = require('google-closure-compiler').gulp(); const argv = require('yargs').argv; const {rimraf} = require('rimraf'); -const {BUILD_DIR, DEPS_FILE, RELEASE_DIR, TEST_DEPS_FILE, TSC_OUTPUT_DIR, TYPINGS_BUILD_DIR} = require('./config'); +const {BUILD_DIR, DEPS_FILE, RELEASE_DIR, TSC_OUTPUT_DIR, TYPINGS_BUILD_DIR} = require('./config'); const {getPackageJson} = require('./helper_tasks'); const {posixPath, quote} = require('../helpers'); @@ -305,36 +305,17 @@ function buildJavaScript(done) { * This task updates DEPS_FILE (deps.js), used by the debug module * loader (via bootstrap.js) when loading Blockly in uncompiled mode. * - * Also updates TEST_DEPS_FILE (deps.mocha.js), used by the mocha test - * suite. - * * Prerequisite: buildJavaScript. */ function buildDeps() { const roots = [ path.join(TSC_OUTPUT_DIR, 'closure', 'goog', 'base.js'), TSC_OUTPUT_DIR, - 'tests/mocha', ]; /** Maximum buffer size, in bytes for child process stdout/stderr. */ const MAX_BUFFER_SIZE = 10 * 1024 * 1024; - /** - * Filter a string to extract lines containing (or not containing) the - * specified target string. - * - * @param {string} text Text to filter. - * @param {string} target String to search for. - * @param {boolean?} exclude If true, extract only non-matching lines. - * @returns {string} Filtered text. - */ - function filter(text, target, exclude) { - return text.split('\n') - .filter((line) => Boolean(line.match(target)) !== Boolean(exclude)) - .join('\n'); - } - /** * Log unexpected diagnostics, after removing expected warnings. * @@ -374,9 +355,7 @@ error message above, try running: } else { log(stderr); // Anything not about mocha goes in DEPS_FILE. - fs.writeFileSync(DEPS_FILE, filter(stdout, 'tests/mocha', true)); - // Anything about mocha does in TEST_DEPS_FILE. - fs.writeFileSync(TEST_DEPS_FILE, filter(stdout, 'tests/mocha')); + fs.writeFileSync(DEPS_FILE, stdout); resolve(); } }); @@ -691,10 +670,8 @@ async function buildShims() { // ESM, but fortunately we don't attempt to import or require this // file from node.js - we only feed it to Closure Compiler, which // uses the type information in deps.js rather than package.json. - await fsPromises.writeFile( - path.join(BUILD_DIR, 'package.json'), - '{"type": "module"}' - ); + const TMP_PACKAGE_JSON = path.join(BUILD_DIR, 'package.json'); + await fsPromises.writeFile(TMP_PACKAGE_JSON, '{"type": "module"}'); // Import each entrypoint module, enumerate its exports, and write // a shim to load the chunk either by importing the entrypoint @@ -723,6 +700,8 @@ ${Object.keys(exports).map((name) => ` ${name},`).join('\n')} ); `); })); + + await fsPromises.rm(TMP_PACKAGE_JSON); } diff --git a/scripts/gulpfiles/config.js b/scripts/gulpfiles/config.js index 674432ddef8..02a0499c46b 100644 --- a/scripts/gulpfiles/config.js +++ b/scripts/gulpfiles/config.js @@ -28,9 +28,6 @@ exports.BUILD_DIR = 'build'; // Dependencies file (used by bootstrap.js in uncompiled mode): exports.DEPS_FILE = path.join(exports.BUILD_DIR, 'deps.js'); -// Mocha test dependencies file (used by tests/mocha/index.html): -exports.TEST_DEPS_FILE = path.join(exports.BUILD_DIR, 'deps.mocha.js'); - // Directory to write typings output to. exports.TYPINGS_BUILD_DIR = path.join(exports.BUILD_DIR, 'declarations'); diff --git a/tests/mocha/astnode_test.js b/tests/mocha/astnode_test.js index a9111926190..a9f0de0d33c 100644 --- a/tests/mocha/astnode_test.js +++ b/tests/mocha/astnode_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.astNode'); - import {ASTNode} from '../../build/src/core/keyboard_nav/ast_node.js'; import { sharedTestSetup, diff --git a/tests/mocha/block_json_test.js b/tests/mocha/block_json_test.js index cd4337ef03f..e89c68e7c1d 100644 --- a/tests/mocha/block_json_test.js +++ b/tests/mocha/block_json_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.blockJson'); - import {Align} from '../../build/src/core/inputs/align.js'; import { sharedTestSetup, diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index 7308ce6075d..2cf50fea02f 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.blocks'); - import {ConnectionType} from '../../build/src/core/connection_type.js'; import {createDeprecationWarningStub} from './test_helpers/warnings.js'; import {createRenderedBlock} from './test_helpers/block_definitions.js'; diff --git a/tests/mocha/blocks/lists_test.js b/tests/mocha/blocks/lists_test.js index e4875225ac0..07510513b07 100644 --- a/tests/mocha/blocks/lists_test.js +++ b/tests/mocha/blocks/lists_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.lists'); - import {runSerializationTestSuite} from '../test_helpers/serialization.js'; import { sharedTestSetup, diff --git a/tests/mocha/blocks/logic_ternary_test.js b/tests/mocha/blocks/logic_ternary_test.js index 9a1e3be4849..2afa51f7aaf 100644 --- a/tests/mocha/blocks/logic_ternary_test.js +++ b/tests/mocha/blocks/logic_ternary_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.logicTernary'); - import * as eventUtils from '../../../build/src/core/events/utils.js'; import {runSerializationTestSuite} from '../test_helpers/serialization.js'; import { diff --git a/tests/mocha/blocks/procedures_test.js b/tests/mocha/blocks/procedures_test.js index 5163e715d3e..6173179cd0c 100644 --- a/tests/mocha/blocks/procedures_test.js +++ b/tests/mocha/blocks/procedures_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.procedures'); - import * as Blockly from '../../../build/src/core/blockly.js'; import { assertCallBlockStructure, diff --git a/tests/mocha/blocks/variables_test.js b/tests/mocha/blocks/variables_test.js index 75afa9d56a8..caee68aeca7 100644 --- a/tests/mocha/blocks/variables_test.js +++ b/tests/mocha/blocks/variables_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.variables'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/clipboard_test.js b/tests/mocha/clipboard_test.js index f6cf10a2551..f134b1d7795 100644 --- a/tests/mocha/clipboard_test.js +++ b/tests/mocha/clipboard_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.clipboard'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/comment_deserialization_test.js b/tests/mocha/comment_deserialization_test.js index c7398bbe0e0..494c584e787 100644 --- a/tests/mocha/comment_deserialization_test.js +++ b/tests/mocha/comment_deserialization_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.commentDeserialization'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/comment_test.js b/tests/mocha/comment_test.js index fa3190d956f..6f19aa7f057 100644 --- a/tests/mocha/comment_test.js +++ b/tests/mocha/comment_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.comments'); - import {assertEventFired} from './test_helpers/events.js'; import * as eventUtils from '../../build/src/core/events/utils.js'; import { diff --git a/tests/mocha/connection_checker_test.js b/tests/mocha/connection_checker_test.js index 908adf8fb70..09797d6a772 100644 --- a/tests/mocha/connection_checker_test.js +++ b/tests/mocha/connection_checker_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.connectionChecker'); - import {ConnectionType} from '../../build/src/core/connection_type.js'; import { sharedTestSetup, diff --git a/tests/mocha/connection_db_test.js b/tests/mocha/connection_db_test.js index 7f3219fa2c9..9cf579f1b1d 100644 --- a/tests/mocha/connection_db_test.js +++ b/tests/mocha/connection_db_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.connectionDb'); - import {ConnectionType} from '../../build/src/core/connection_type.js'; import { sharedTestSetup, diff --git a/tests/mocha/connection_test.js b/tests/mocha/connection_test.js index 0646458b8b6..afba4948cff 100644 --- a/tests/mocha/connection_test.js +++ b/tests/mocha/connection_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.connection'); - import { createGenUidStubWithReturns, sharedTestSetup, diff --git a/tests/mocha/contextmenu_items_test.js b/tests/mocha/contextmenu_items_test.js index a9d1a500968..4596513c68c 100644 --- a/tests/mocha/contextmenu_items_test.js +++ b/tests/mocha/contextmenu_items_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.contextMenuItem'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/cursor_test.js b/tests/mocha/cursor_test.js index c435a1e5ec0..c7b3a76afcc 100644 --- a/tests/mocha/cursor_test.js +++ b/tests/mocha/cursor_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.cursor'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/dropdowndiv_test.js b/tests/mocha/dropdowndiv_test.js index a2e08e4d129..22066dda4e0 100644 --- a/tests/mocha/dropdowndiv_test.js +++ b/tests/mocha/dropdowndiv_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.dropdown'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_block_change_test.js b/tests/mocha/event_block_change_test.js index 39823852741..4f4728cc32c 100644 --- a/tests/mocha/event_block_change_test.js +++ b/tests/mocha/event_block_change_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockChange'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_block_create_test.js b/tests/mocha/event_block_create_test.js index 1469df4bbff..b17b277e79e 100644 --- a/tests/mocha/event_block_create_test.js +++ b/tests/mocha/event_block_create_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockCreate'); - import {assertEventFired} from './test_helpers/events.js'; import * as eventUtils from '../../build/src/core/events/utils.js'; import { diff --git a/tests/mocha/event_block_delete_test.js b/tests/mocha/event_block_delete_test.js index 806ecad4b9e..1aa70c4d1ab 100644 --- a/tests/mocha/event_block_delete_test.js +++ b/tests/mocha/event_block_delete_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockDelete'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_block_drag_test.js b/tests/mocha/event_block_drag_test.js index 176666f6f7b..8a5399c8bde 100644 --- a/tests/mocha/event_block_drag_test.js +++ b/tests/mocha/event_block_drag_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockDrag'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_block_field_intermediate_change_test.js b/tests/mocha/event_block_field_intermediate_change_test.js index 6990eda19ba..e8a71effbdc 100644 --- a/tests/mocha/event_block_field_intermediate_change_test.js +++ b/tests/mocha/event_block_field_intermediate_change_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockFieldIntermediateChange'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_block_move_test.js b/tests/mocha/event_block_move_test.js index b647ee17355..2b4102de6a0 100644 --- a/tests/mocha/event_block_move_test.js +++ b/tests/mocha/event_block_move_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBlockMove'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_bubble_open_test.js b/tests/mocha/event_bubble_open_test.js index 910030b9d49..54e48aa9cff 100644 --- a/tests/mocha/event_bubble_open_test.js +++ b/tests/mocha/event_bubble_open_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventBubbleOpen'); - import {defineMutatorBlocks} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_click_test.js b/tests/mocha/event_click_test.js index 47ee96edf07..ec998b62de4 100644 --- a/tests/mocha/event_click_test.js +++ b/tests/mocha/event_click_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventClick'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_comment_change_test.js b/tests/mocha/event_comment_change_test.js index fd9827ac6c2..7c68d0858b1 100644 --- a/tests/mocha/event_comment_change_test.js +++ b/tests/mocha/event_comment_change_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventCommentChange'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_comment_create_test.js b/tests/mocha/event_comment_create_test.js index 31ebd2e9410..d140eff8526 100644 --- a/tests/mocha/event_comment_create_test.js +++ b/tests/mocha/event_comment_create_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventCommentCreate'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_comment_delete_test.js b/tests/mocha/event_comment_delete_test.js index ae9c016b698..fc4b7701fa3 100644 --- a/tests/mocha/event_comment_delete_test.js +++ b/tests/mocha/event_comment_delete_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventCommentDelete'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_comment_move_test.js b/tests/mocha/event_comment_move_test.js index d192053f00c..a0b0b5eabf3 100644 --- a/tests/mocha/event_comment_move_test.js +++ b/tests/mocha/event_comment_move_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventCommentMove'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_marker_move_test.js b/tests/mocha/event_marker_move_test.js index df8fa544a07..26238dc43db 100644 --- a/tests/mocha/event_marker_move_test.js +++ b/tests/mocha/event_marker_move_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventMarkerMove'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_selected_test.js b/tests/mocha/event_selected_test.js index 83a64a56619..3c69889f2b1 100644 --- a/tests/mocha/event_selected_test.js +++ b/tests/mocha/event_selected_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventSelected'); - import {defineRowBlock} from './test_helpers/block_definitions.js'; import { sharedTestSetup, diff --git a/tests/mocha/event_test.js b/tests/mocha/event_test.js index 1fd7addb12a..e59cb4911a1 100644 --- a/tests/mocha/event_test.js +++ b/tests/mocha/event_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.event'); - import * as Blockly from '../../build/src/core/blockly.js'; import {ASTNode} from '../../build/src/core/keyboard_nav/ast_node.js'; import { diff --git a/tests/mocha/event_theme_change_test.js b/tests/mocha/event_theme_change_test.js index 1e3fa2c884b..155e373a3f9 100644 --- a/tests/mocha/event_theme_change_test.js +++ b/tests/mocha/event_theme_change_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventThemeChange'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_toolbox_item_select_test.js b/tests/mocha/event_toolbox_item_select_test.js index 32b0857811d..82f8e4863b2 100644 --- a/tests/mocha/event_toolbox_item_select_test.js +++ b/tests/mocha/event_toolbox_item_select_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventToolboxItemSelect'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_trashcan_open_test.js b/tests/mocha/event_trashcan_open_test.js index c85dbd3d1d0..84c2abd9c56 100644 --- a/tests/mocha/event_trashcan_open_test.js +++ b/tests/mocha/event_trashcan_open_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventTrashcanOpen'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_var_create_test.js b/tests/mocha/event_var_create_test.js index 433d5d4ae5f..003cd11b5a2 100644 --- a/tests/mocha/event_var_create_test.js +++ b/tests/mocha/event_var_create_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventVarCreate'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_var_delete_test.js b/tests/mocha/event_var_delete_test.js index 2619a8db05c..7bad8eb7b73 100644 --- a/tests/mocha/event_var_delete_test.js +++ b/tests/mocha/event_var_delete_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventVarDelete'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_var_rename_test.js b/tests/mocha/event_var_rename_test.js index 8f9d63d88c3..0c8fb80cdad 100644 --- a/tests/mocha/event_var_rename_test.js +++ b/tests/mocha/event_var_rename_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventVarRename'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/event_viewport_test.js b/tests/mocha/event_viewport_test.js index 275d6854bfc..7913e7bf507 100644 --- a/tests/mocha/event_viewport_test.js +++ b/tests/mocha/event_viewport_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.eventViewportChange'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/extensions_test.js b/tests/mocha/extensions_test.js index f918b935cf3..8eb37e75df7 100644 --- a/tests/mocha/extensions_test.js +++ b/tests/mocha/extensions_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.extensions'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/field_angle_test.js b/tests/mocha/field_angle_test.js index 6ab13084289..62afd8d2761 100644 --- a/tests/mocha/field_angle_test.js +++ b/tests/mocha/field_angle_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldAngle'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_checkbox_test.js b/tests/mocha/field_checkbox_test.js index 5e971cd0cdf..4f9503d9c5b 100644 --- a/tests/mocha/field_checkbox_test.js +++ b/tests/mocha/field_checkbox_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldCheckbox'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_colour_test.js b/tests/mocha/field_colour_test.js index 97aba7d9595..fcc5041bdae 100644 --- a/tests/mocha/field_colour_test.js +++ b/tests/mocha/field_colour_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldColour'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_dropdown_test.js b/tests/mocha/field_dropdown_test.js index 26820230ee4..6162112876c 100644 --- a/tests/mocha/field_dropdown_test.js +++ b/tests/mocha/field_dropdown_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldDropdown'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_image_test.js b/tests/mocha/field_image_test.js index 6911d867924..ec8ad222712 100644 --- a/tests/mocha/field_image_test.js +++ b/tests/mocha/field_image_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldImage'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_label_serializable_test.js b/tests/mocha/field_label_serializable_test.js index 61c6d72c720..37052f046cf 100644 --- a/tests/mocha/field_label_serializable_test.js +++ b/tests/mocha/field_label_serializable_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldLabelSerialization'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_label_test.js b/tests/mocha/field_label_test.js index a378334a22d..368e7fd3cf7 100644 --- a/tests/mocha/field_label_test.js +++ b/tests/mocha/field_label_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldLabel'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_multilineinput_test.js b/tests/mocha/field_multilineinput_test.js index de2a8189f37..abdf6823722 100644 --- a/tests/mocha/field_multilineinput_test.js +++ b/tests/mocha/field_multilineinput_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldMultiline'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_number_test.js b/tests/mocha/field_number_test.js index 3b03a51351a..4dcc930da5f 100644 --- a/tests/mocha/field_number_test.js +++ b/tests/mocha/field_number_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldNumber'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_registry_test.js b/tests/mocha/field_registry_test.js index 41c320c574b..f8e4bb9b4cd 100644 --- a/tests/mocha/field_registry_test.js +++ b/tests/mocha/field_registry_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldRegistry'); - import * as Blockly from '../../build/src/core/blockly.js'; import {createDeprecationWarningStub} from './test_helpers/warnings.js'; import { diff --git a/tests/mocha/field_test.js b/tests/mocha/field_test.js index c8e73e29d89..7265a1bb4cd 100644 --- a/tests/mocha/field_test.js +++ b/tests/mocha/field_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldTest'); - import * as Blockly from '../../build/src/core/blockly.js'; import { addBlockTypeToCleanup, diff --git a/tests/mocha/field_textinput_test.js b/tests/mocha/field_textinput_test.js index 27d95078931..5a8a8247978 100644 --- a/tests/mocha/field_textinput_test.js +++ b/tests/mocha/field_textinput_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldTextInput'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/field_variable_test.js b/tests/mocha/field_variable_test.js index 011c44dbce5..0815303c655 100644 --- a/tests/mocha/field_variable_test.js +++ b/tests/mocha/field_variable_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.fieldVariable'); - import * as Blockly from '../../build/src/core/blockly.js'; import { assertFieldValue, diff --git a/tests/mocha/flyout_test.js b/tests/mocha/flyout_test.js index 3c38d2552b2..f2fe79e3851 100644 --- a/tests/mocha/flyout_test.js +++ b/tests/mocha/flyout_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.flyout'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/generator_test.js b/tests/mocha/generator_test.js index 7d14158749c..eea386432a9 100644 --- a/tests/mocha/generator_test.js +++ b/tests/mocha/generator_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.generator'); - import * as Blockly from '../../build/src/core/blockly.js'; import {DartGenerator} from '../../build/src/generators/dart/dart_generator.js'; import {JavascriptGenerator} from '../../build/src/generators/javascript/javascript_generator.js'; diff --git a/tests/mocha/gesture_test.js b/tests/mocha/gesture_test.js index 01885427bbb..0572fed5b94 100644 --- a/tests/mocha/gesture_test.js +++ b/tests/mocha/gesture_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.gesture'); - import {assertEventFired, assertEventNotFired} from './test_helpers/events.js'; import {defineBasicBlockWithField} from './test_helpers/block_definitions.js'; import {dispatchPointerEvent} from './test_helpers/user_input.js'; diff --git a/tests/mocha/icon_test.js b/tests/mocha/icon_test.js index 4c3d204928d..4ff27997fe8 100644 --- a/tests/mocha/icon_test.js +++ b/tests/mocha/icon_test.js @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.declareModuleId('Blockly.test.icon'); - import { sharedTestSetup, sharedTestTeardown, diff --git a/tests/mocha/index.html b/tests/mocha/index.html index de11f6a94f1..f94eabfa14e 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -29,106 +29,123 @@ ui: 'tdd', failZero: true, }); + + + -
@@ -202,21 +219,5 @@ style="display: none">