Skip to content

Commit

Permalink
chore(tests): Add missing imports of closure/goog/goog.js
Browse files Browse the repository at this point in the history
These modules were depending on being loaded via the
debug module loader, which cannot be used without first loading
base.js as a script, and thereby defining goog.declareModuleId
as a side effect—but if they are to be loaded via direct import
statements then they need to actually import their own
dependencies.

This is a temporary measure as soon the goog.declareMouleId
calls can themselves be deleted.
  • Loading branch information
cpcallen committed Aug 17, 2023
1 parent fe885b0 commit de9499b
Show file tree
Hide file tree
Showing 98 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/mocha/astnode_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.astNode');

import {ASTNode} from '../../build/src/core/keyboard_nav/ast_node.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/block_json_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.blockJson');

import {Align} from '../../build/src/core/inputs/align.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/block_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.blocks');

import {ConnectionType} from '../../build/src/core/connection_type.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/blocks/lists_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.lists');

import {runSerializationTestSuite} from '../test_helpers/serialization.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/blocks/logic_ternary_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.logicTernary');

import * as eventUtils from '../../../build/src/core/events/utils.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/blocks/procedures_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.procedures');

import * as Blockly from '../../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/blocks/variables_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.variables');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/clipboard_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.clipboard');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/comment_deserialization_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.commentDeserialization');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/comment_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.comments');

import {assertEventFired} from './test_helpers/events.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/connection_checker_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.connectionChecker');

import {ConnectionType} from '../../build/src/core/connection_type.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/connection_db_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.connectionDb');

import {ConnectionType} from '../../build/src/core/connection_type.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/connection_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.connection');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/contextmenu_items_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.contextMenuItem');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/cursor_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.cursor');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/dropdowndiv_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.dropdown');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_change_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockChange');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_create_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockCreate');

import {assertEventFired} from './test_helpers/events.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_delete_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockDelete');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_drag_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockDrag');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_field_intermediate_change_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockFieldIntermediateChange');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_block_move_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBlockMove');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_bubble_open_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventBubbleOpen');

import {defineMutatorBlocks} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventClick');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_comment_change_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventCommentChange');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_comment_create_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventCommentCreate');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_comment_delete_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventCommentDelete');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_comment_move_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventCommentMove');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_marker_move_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventMarkerMove');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_selected_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventSelected');

import {defineRowBlock} from './test_helpers/block_definitions.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.event');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_theme_change_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventThemeChange');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_toolbox_item_select_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventToolboxItemSelect');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_trashcan_open_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventTrashcanOpen');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_var_create_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventVarCreate');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_var_delete_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventVarDelete');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_var_rename_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventVarRename');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/event_viewport_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.eventViewportChange');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/extensions_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.extensions');

import {
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_angle_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldAngle');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_checkbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldCheckbox');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_colour_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldColour');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_dropdown_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldDropdown');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_image_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldImage');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_label_serializable_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldLabelSerialization');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_label_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldLabel');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_multilineinput_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldMultiline');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_number_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldNumber');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_registry_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldRegistry');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
1 change: 1 addition & 0 deletions tests/mocha/field_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.test.fieldTest');

import * as Blockly from '../../build/src/core/blockly.js';
Expand Down
Loading

0 comments on commit de9499b

Please sign in to comment.