Skip to content

Commit

Permalink
fix(plugins): Build tests against 'blockly', not 'blockly/node'
Browse files Browse the repository at this point in the history
The latter has never been an advertised entrypoint, and will
cease to be a valid entrypoint in v11 (see google/blockly#7822).
Fortunately the 'blockly' entrypoint behaves the same as
the 'blockly/node' entrypoint does in a node.js environment.
  • Loading branch information
cpcallen committed Feb 29, 2024
1 parent 27c9873 commit f4d977d
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion plugins/block-dynamic-connection/test/dynamic_if.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {overrideOldBlockDefinitions} = require('../src/index');

const assert = chai.assert;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/**
* @license
* Copyright 2021 Google LLC
Expand All @@ -6,7 +7,7 @@

const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {overrideOldBlockDefinitions} = require('../src/index');

const assert = chai.assert;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/**
* @license
* Copyright 2021 Google LLC
Expand All @@ -6,7 +7,7 @@

const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {overrideOldBlockDefinitions} = require('../src/index');

const assert = chai.assert;
Expand Down
2 changes: 1 addition & 1 deletion plugins/block-plus-minus/test/if.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const {runPlusMinusTestSuite} = require('./test_helpers.mocha');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {dartGenerator} = require('blockly/dart');
const {javascriptGenerator} = require('blockly/javascript');
const {luaGenerator} = require('blockly/lua');
Expand Down
2 changes: 1 addition & 1 deletion plugins/block-plus-minus/test/list_create.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const {runPlusMinusTestSuite} = require('./test_helpers.mocha');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {dartGenerator} = require('blockly/dart');
const {javascriptGenerator} = require('blockly/javascript');
const {luaGenerator} = require('blockly/lua');
Expand Down
2 changes: 1 addition & 1 deletion plugins/block-plus-minus/test/procedures.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const chai = require('chai');
const sinon = require('sinon');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {testHelpers} = require('@blockly/dev-tools');
const procedureTestHelpers = require('./procedures_test_helpers.mocha');
const {dartGenerator} = require('blockly/dart');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

const chai = require('chai');
const Blockly = require('blockly/node');
const Blockly = require('blockly');

require('../src/index');
const assert = chai.assert;
Expand Down
2 changes: 1 addition & 1 deletion plugins/block-plus-minus/test/text_join.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const {testHelpers} = require('@blockly/dev-tools');
const {runPlusMinusTestSuite} = require('./test_helpers.mocha');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {dartGenerator} = require('blockly/dart');
const {javascriptGenerator} = require('blockly/javascript');
const {luaGenerator} = require('blockly/lua');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const eventTestHelpers = require('./event_test_helpers');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
const {ObservableParameterModel} = require('../src/observable_parameter_model');
const {ProcedureCreate} = require('../src/events_procedure_create');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {testHelpers} = require('@blockly/dev-tools');
const eventTestHelpers = require('./event_test_helpers');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const eventTestHelpers = require('./event_test_helpers');
const {testHelpers} = require('@blockly/dev-tools');
const {ObservableProcedureModel} = require('../src/observable_procedure_model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

const Blockly = require('blockly/node');
const Blockly = require('blockly');
const chai = require('chai');
const assert = chai.assert;
const sinon = require('sinon');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const chai = require('chai');
const sinon = require('sinon');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
require('./field_dependent_dropdown_test_block');

const assert = chai.assert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

const chai = require('chai');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {Navigation} = require('../src/navigation');
const assert = chai.assert;
const {testHelpers} = require('@blockly/dev-tools');
Expand Down
2 changes: 1 addition & 1 deletion plugins/keyboard-navigation/test/navigation_test.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const chai = require('chai');
const sinon = require('sinon');

const Blockly = require('blockly/node');
const Blockly = require('blockly');
const {NavigationController, Constants} = require('../src/index');
const {
createNavigationWorkspace,
Expand Down
2 changes: 1 addition & 1 deletion plugins/keyboard-navigation/test/shortcuts_test.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const sinon = require('sinon');
const chai = require('chai');

const Blockly = require('blockly/node');
const Blockly = require('blockly');

const {NavigationController} = require('../src/index');
const {
Expand Down
2 changes: 1 addition & 1 deletion plugins/modal/test/modal_test.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

const assert = require('assert');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const sinon = require('sinon');

const Modal = require('../src/index.js').Modal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

const chai = require('chai');
const Blockly = require('blockly/node');
const Blockly = require('blockly');

const StrictConnectionChecker =
require('../src/index.js').StrictConnectionChecker;
Expand Down
2 changes: 1 addition & 1 deletion plugins/suggested-blocks/test/suggested_blocks.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const {assert} = require('chai');
const sinon = require('sinon');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const SuggestedBlocks = require('../src/index');

const STANDARD_TEST_CASE = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

const assert = require('assert');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const sinon = require('sinon');

const {TypedVariableModal} = require('../src/index.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

const assert = require('assert');
const Blockly = require('blockly/node');
const Blockly = require('blockly');
const sinon = require('sinon');

const {WorkspaceSearch} = require('../src/index');
Expand Down

0 comments on commit f4d977d

Please sign in to comment.