fix(tests): Enable --debug for test:compile:advanced; fix some errors (and demote the rest to warnings) (#5983)

* refactor(tests): Migrate tests/compile/main.js to goog.module

* feat(tests): Enable --debug for test:compile:advanced; demote errors

  * Enable the --debug flag when running the
    buildAdvancedCompilationTest gulp task.
  * Remove partialAlias diagnostic group from `JSC_ERROR`, demoting
    JSC_PARTIAL_NAMESPACE to warning.

  Reverts "Revert 'fix(tests): Enable --debug for test:compile:advanced;
  fix some errors (#5959)'".
This commit is contained in:
Christopher Allen
2022-03-08 23:20:19 +00:00
committed by GitHub
parent c1004be1f2
commit e11b5834e5
3 changed files with 24 additions and 10 deletions

View File

@@ -4,19 +4,33 @@
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('Main');
goog.module('Main');
// Core
// Either require 'Blockly.requires', or just the components you use:
goog.require('Blockly');
/* eslint-disable-next-line no-unused-vars */
const {BlocklyOptions} = goog.requireType('Blockly.BlocklyOptions');
const {inject} = goog.require('Blockly.inject');
/** @suppress {extraRequire} */
goog.require('Blockly.geras.Renderer');
/** @suppress {extraRequire} */
goog.require('Blockly.VerticalFlyout');
// Blocks
goog.require('Blockly.libraryBlocks');
/** @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.testBlocks');
Main.init = function() {
Blockly.inject('blocklyDiv', {
'toolbox': document.getElementById('toolbox')
});
function init() {
inject('blocklyDiv', /** @type {BlocklyOptions} */ ({
'toolbox': document.getElementById('toolbox')
}));
};
window.addEventListener('load', Main.init);
window.addEventListener('load', init);