From 2a0e54759dcd4b00e543ffd45ad2ed570ca7177c Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 1 Mar 2022 15:15:29 -0800 Subject: [PATCH] Revert "fix(tests): Enable --debug for test:compile:advanced; fix some errors (#5959)" This reverts commit 88334bea80aa26c08705f16aba5e79dd708158f9. --- package.json | 2 +- tests/compile/main.js | 30 ++++++++---------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 149e38a61bf..88cc6c0efa3 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test": "tests/run_all_tests.sh", "test:generators": "tests/scripts/run_generators.sh", "test:mocha:interactive": "http-server ./ -o /tests/mocha/index.html -c-1", - "test:compile:advanced": "gulp buildAdvancedCompilationTest --debug", + "test:compile:advanced": "gulp buildAdvancedCompilationTest", "typings": "gulp typings", "updateGithubPages": "gulp gitUpdateGithubPages" }, diff --git a/tests/compile/main.js b/tests/compile/main.js index b5d20a770cd..586f4ce3648 100644 --- a/tests/compile/main.js +++ b/tests/compile/main.js @@ -4,33 +4,19 @@ * SPDX-License-Identifier: Apache-2.0 */ -goog.module('Main'); - +goog.provide('Main'); // Core // Either require 'Blockly.requires', or just the components you use: -/* eslint-disable-next-line no-unused-vars */ -const {BlocklyOptions} = goog.requireType('Blockly.BlocklyOptions'); -const {inject} = goog.require('Blockly.inject'); -/** @suppress {extraRequire} */ +goog.require('Blockly'); goog.require('Blockly.geras.Renderer'); -/** @suppress {extraRequire} */ goog.require('Blockly.VerticalFlyout'); // Blocks -/** @suppress {extraRequire} */ -goog.require('Blockly.libraryBlocks.logic'); -/** @suppress {extraRequire} */ -goog.require('Blockly.libraryBlocks.loops'); -/** @suppress {extraRequire} */ -goog.require('Blockly.libraryBlocks.math'); -/** @suppress {extraRequire} */ -goog.require('Blockly.libraryBlocks.texts'); -/** @suppress {extraRequire} */ +goog.require('Blockly.libraryBlocks'); goog.require('Blockly.libraryBlocks.testBlocks'); - -function init() { - inject('blocklyDiv', /** @type {BlocklyOptions} */ ({ - 'toolbox': document.getElementById('toolbox') - })); +Main.init = function() { + Blockly.inject('blocklyDiv', { + 'toolbox': document.getElementById('toolbox') + }); }; -window.addEventListener('load', init); +window.addEventListener('load', Main.init);