Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"test:compile:advanced": "gulp buildAdvancedCompilationTest --debug",
"typings": "gulp typings",
"updateGithubPages": "gulp gitUpdateGithubPages"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/gulpfiles/build_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ var JSCOMP_ERROR = [
'moduleLoad',
'msgDescriptions',
'nonStandardJsDocs',
'partialAlias',
// 'partialAlias', // Don't want this to be an error yet; only warning.
// 'polymer', // Not applicable.
// 'reportUnknownTypes', // VERY verbose.
// 'strictCheckTypes', // Use --strict to enable.
Expand Down
30 changes: 22 additions & 8 deletions tests/compile/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);