diff --git a/tests/mocha/astnode_test.js b/tests/mocha/astnode_test.js index 09e38dcb2..410739ea5 100644 --- a/tests/mocha/astnode_test.js +++ b/tests/mocha/astnode_test.js @@ -6,7 +6,7 @@ goog.declareModuleId('Blockly.test.astNode'); -const {ASTNode} = goog.require('Blockly.ASTNode'); +import {ASTNode} from '../../core/keyboard_nav/ast_node.js'; import {sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/block_create_event_test.js b/tests/mocha/block_create_event_test.js index c75d8c461..910da2280 100644 --- a/tests/mocha/block_create_event_test.js +++ b/tests/mocha/block_create_event_test.js @@ -7,7 +7,7 @@ goog.declareModuleId('Blockly.test.blockCreateEvent'); import {assertEventFired} from './test_helpers/events.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/block_json_test.js b/tests/mocha/block_json_test.js index ffb40aa5d..7d814a911 100644 --- a/tests/mocha/block_json_test.js +++ b/tests/mocha/block_json_test.js @@ -6,7 +6,7 @@ goog.declareModuleId('Blockly.test.blockJson'); -const {Align} = goog.require('Blockly.Input'); +import {Align} from '../../core/input.js'; suite('Block JSON initialization', function() { diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index b31d9b18f..aa5f9f51d 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -6,11 +6,11 @@ goog.declareModuleId('Blockly.test.blocks'); -const {Blocks} = goog.require('Blockly.blocks'); -const {ConnectionType} = goog.require('Blockly.ConnectionType'); +import {Blocks} from '../../blocks/blocks.js'; +import {ConnectionType} from '../../core/connection_type.js'; import {createDeprecationWarningStub} from './test_helpers/warnings.js'; import {createRenderedBlock} from './test_helpers/block_definitions.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/comment_test.js b/tests/mocha/comment_test.js index c3db5badc..7bb8eacda 100644 --- a/tests/mocha/comment_test.js +++ b/tests/mocha/comment_test.js @@ -7,7 +7,7 @@ goog.declareModuleId('Blockly.test.comments'); import {assertEventFired} from './test_helpers/events.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/connection_checker_test.js b/tests/mocha/connection_checker_test.js index a02268837..c678849e9 100644 --- a/tests/mocha/connection_checker_test.js +++ b/tests/mocha/connection_checker_test.js @@ -6,7 +6,7 @@ goog.declareModuleId('Blockly.test.connectionChecker'); -const {ConnectionType} = goog.require('Blockly.ConnectionType'); +import {ConnectionType} from '../../core/connection_type.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/connection_db_test.js b/tests/mocha/connection_db_test.js index 484884181..db79beee2 100644 --- a/tests/mocha/connection_db_test.js +++ b/tests/mocha/connection_db_test.js @@ -6,7 +6,7 @@ goog.declareModuleId('Blockly.test.connectionDb'); -const {ConnectionType} = goog.require('Blockly.ConnectionType'); +import {ConnectionType} from '../../core/connection_type.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/cursor_test.js b/tests/mocha/cursor_test.js index bdd712521..64f8c97f7 100644 --- a/tests/mocha/cursor_test.js +++ b/tests/mocha/cursor_test.js @@ -7,7 +7,7 @@ goog.declareModuleId('Blockly.test.cursor'); import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; -const {ASTNode} = goog.require('Blockly.ASTNode'); +import {ASTNode} from '../../core/keyboard_nav/ast_node.js'; suite('Cursor', function() { diff --git a/tests/mocha/event_test.js b/tests/mocha/event_test.js index ce3cd58c6..98465097d 100644 --- a/tests/mocha/event_test.js +++ b/tests/mocha/event_test.js @@ -6,12 +6,12 @@ goog.declareModuleId('Blockly.test.event'); -const {ASTNode} = goog.require('Blockly.ASTNode'); +import {ASTNode} from '../../core/keyboard_nav/ast_node.js'; import {assertEventEquals, assertNthCallEventArgEquals, createFireChangeListenerSpy} from './test_helpers/events.js'; import {assertVariableValues} from './test_helpers/variables.js'; import {createGenUidStubWithReturns, sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; -const eventUtils = goog.require('Blockly.Events.utils'); -goog.require('Blockly.WorkspaceComment'); +import * as eventUtils from '../../core/events/utils.js'; +import {WorkspaceComment} from '../../core/workspace_comment.js'; suite('Events', function() { diff --git a/tests/mocha/generator_test.js b/tests/mocha/generator_test.js index f4d5ed819..6794cd418 100644 --- a/tests/mocha/generator_test.js +++ b/tests/mocha/generator_test.js @@ -6,6 +6,7 @@ goog.declareModuleId('Blockly.test.generator'); +// TODO: Not sure hwo to handle this. const {dartGenerator} = goog.require('Blockly.Dart'); const {javaScriptGenerator} = goog.require('Blockly.JavaScript'); const {luaGenerator} = goog.require('Blockly.Lua'); diff --git a/tests/mocha/gesture_test.js b/tests/mocha/gesture_test.js index 8315398ee..b324b0222 100644 --- a/tests/mocha/gesture_test.js +++ b/tests/mocha/gesture_test.js @@ -9,7 +9,7 @@ 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'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/jso_deserialization_test.js b/tests/mocha/jso_deserialization_test.js index 7df21c9f3..b4fd43d72 100644 --- a/tests/mocha/jso_deserialization_test.js +++ b/tests/mocha/jso_deserialization_test.js @@ -8,7 +8,7 @@ goog.declareModuleId('Blockly.test.jsoDeserialization'); import {sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; import {assertEventFired} from './test_helpers/events.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; suite('JSO Deserialization', function() { diff --git a/tests/mocha/theme_test.js b/tests/mocha/theme_test.js index 9e2788dd8..ce279f8bb 100644 --- a/tests/mocha/theme_test.js +++ b/tests/mocha/theme_test.js @@ -7,7 +7,7 @@ goog.declareModuleId('Blockly.test.theme'); import {assertEventFired} from './test_helpers/events.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/trashcan_test.js b/tests/mocha/trashcan_test.js index 6f531d850..bd583b360 100644 --- a/tests/mocha/trashcan_test.js +++ b/tests/mocha/trashcan_test.js @@ -9,7 +9,7 @@ goog.declareModuleId('Blockly.test.trashcan'); import {assertEventFired, assertEventNotFired} from './test_helpers/events.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; import {defineBasicBlockWithField, defineMutatorBlocks, defineRowBlock, defineStackBlock, defineStatementBlock} from './test_helpers/block_definitions.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {simulateClick} from './test_helpers/user_input.js'; diff --git a/tests/mocha/workspace_comment_test.js b/tests/mocha/workspace_comment_test.js index 4fbb822f7..d82e00d64 100644 --- a/tests/mocha/workspace_comment_test.js +++ b/tests/mocha/workspace_comment_test.js @@ -6,7 +6,7 @@ goog.declareModuleId('Blockly.test.workspaceComment'); -goog.require('Blockly.WorkspaceComment'); +import {WorkspaceComment} from '../../core/workspace_comment.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; diff --git a/tests/mocha/workspace_svg_test.js b/tests/mocha/workspace_svg_test.js index c1cce96b3..82f4279b5 100644 --- a/tests/mocha/workspace_svg_test.js +++ b/tests/mocha/workspace_svg_test.js @@ -9,7 +9,7 @@ goog.declareModuleId('Blockly.test.workspaceSvg'); import {assertEventFired, assertEventNotFired, createFireChangeListenerSpy} from './test_helpers/events.js'; import {assertVariableValues} from './test_helpers/variables.js'; import {defineStackBlock} from './test_helpers/block_definitions.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown, workspaceTeardown} from './test_helpers/setup_teardown.js'; import {testAWorkspace} from './test_helpers/workspace.js'; diff --git a/tests/mocha/zoom_controls_test.js b/tests/mocha/zoom_controls_test.js index 6b50d795e..b088f8f9a 100644 --- a/tests/mocha/zoom_controls_test.js +++ b/tests/mocha/zoom_controls_test.js @@ -7,7 +7,7 @@ goog.declareModuleId('Blockly.test.zoomControls'); import {assertEventFired, assertEventNotFired} from './test_helpers/events.js'; -const eventUtils = goog.require('Blockly.Events.utils'); +import * as eventUtils from '../../core/events/utils.js'; import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js'; import {simulateClick} from './test_helpers/user_input.js';