mirror of
https://github.com/google/blockly.git
synced 2026-05-09 13:40:11 +02:00
chore: change test helpers to use esmodule imports
This commit is contained in:
Vendored
+7
-7
@@ -85,13 +85,13 @@
|
||||
// List of scripts to load in compressed mode, instead of
|
||||
// requires. Paths relative to root.
|
||||
compressedScripts: [
|
||||
'blockly_compressed.js',
|
||||
'blocks_compressed.js',
|
||||
'dart_compressed.js',
|
||||
'javascript_compressed.js',
|
||||
'lua_compressed.js',
|
||||
'php_compressed.js',
|
||||
'python_compressed.js',
|
||||
'build/blockly_compressed.js',
|
||||
'build/blocks_compressed.js',
|
||||
'build/dart_compressed.js',
|
||||
'build/javascript_compressed.js',
|
||||
'build/lua_compressed.js',
|
||||
'build/php_compressed.js',
|
||||
'build/python_compressed.js',
|
||||
],
|
||||
|
||||
// Additional scripts to be loaded after Blockly is loaded,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.codeGeneration');
|
||||
|
||||
const {runTestSuites} = goog.require('Blockly.test.helpers.common');
|
||||
import {runTestSuites} from './common.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.fields');
|
||||
|
||||
const {runTestCases, TestCase} = goog.require('Blockly.test.helpers.common');
|
||||
import {runTestCases, TestCase} from './common.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
goog.declareModuleId('Blockly.test.helpers.procedures');
|
||||
|
||||
const {ConnectionType} = goog.require('Blockly.ConnectionType');
|
||||
import {ConnectionType} from '../../../core/connection_type.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.serialization');
|
||||
|
||||
const {runTestCases} = goog.require('Blockly.test.helpers.common');
|
||||
import {runTestCases} from './common.js';
|
||||
|
||||
/**
|
||||
* Serialization test case.
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.setupTeardown');
|
||||
|
||||
const eventUtils = goog.require('Blockly.Events.utils');
|
||||
const {Blocks} = goog.require('Blockly.blocks');
|
||||
|
||||
import * as eventUtils from '../../../core/events/utils.js';
|
||||
import {Blocks} from '../../../blocks/blocks.js';
|
||||
|
||||
/**
|
||||
* Safely disposes of Blockly workspace, logging any errors.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.userInput');
|
||||
|
||||
const {KeyCodes} = goog.require('Blockly.utils.KeyCodes');
|
||||
import {KeyCodes} from '../../../core/utils/keycodes.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.helpers.workspace');
|
||||
|
||||
const {assertVariableValues} = goog.require('Blockly.test.helpers.variables');
|
||||
const {assertWarnings} = goog.require('Blockly.test.helpers.warnings');
|
||||
const eventUtils = goog.require('Blockly.Events.utils');
|
||||
const {workspaceTeardown} = goog.require('Blockly.test.helpers.setupTeardown');
|
||||
import {assertVariableValues} from './variables.js';
|
||||
import {assertWarnings} from './warnings.js';
|
||||
import * as eventUtils from '../../../core/events/utils.js';
|
||||
import {workspaceTeardown} from './setup_teardown.js';
|
||||
|
||||
|
||||
export function testAWorkspace() {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
compressed when it is being hosted or on Internet Explorer. -->
|
||||
<script>
|
||||
var BLOCKLY_BOOTSTRAP_OPTIONS = {
|
||||
loadCompressed: true,
|
||||
additionalScripts: [
|
||||
'msg/messages.js',
|
||||
'tests/playgrounds/screenshot.js',
|
||||
|
||||
Reference in New Issue
Block a user