Skip to content

Commit 66ec2db

Browse files
authored
Merge pull request #5663 from 7se7en72025/test/improve-error-message-scope
test: Enhance error scope validation in AST2BlockList tests
2 parents 6ab5a6a + 98a9e58 commit 66ec2db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

js/js-export/__tests__/ast2blocklist.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ describe("AST2BlockList Class", () => {
5858
try {
5959
AST2BlockList.toBlockList(AST, config);
6060
} catch (e) {
61-
//TODO: error message should isolate to smallest scope
61+
// Verify error message provides context about unsupported statement
6262
expect(e.prefix).toEqual("Unsupported statement: ");
63+
// Error should include position information for scope isolation
64+
expect(e.start).toBeDefined();
65+
expect(e.end).toBeDefined();
6366
}
6467
});
6568

js/loader.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,14 @@ requirejs(["i18next", "i18nextHttpBackend"], function (i18next, i18nextHttpBacke
301301
function () {
302302
// Give scripts a moment to finish executing and set globals
303303
setTimeout(function () {
304-
// Log verification status for debugging (non-blocking)
304+
// Verify core dependencies are loaded
305305
const verificationStatus = {
306306
createjs: typeof window.createjs !== "undefined",
307307
createDefaultStack: typeof window.createDefaultStack !== "undefined",
308308
Logo: typeof window.Logo !== "undefined",
309309
Blocks: typeof window.Blocks !== "undefined",
310310
Turtles: typeof window.Turtles !== "undefined"
311311
};
312-
console.log("Core module verification:", verificationStatus);
313312

314313
// Check critical dependencies (only createjs is truly critical)
315314
if (typeof window.createjs === "undefined") {
@@ -325,7 +324,6 @@ requirejs(["i18next", "i18nextHttpBackend"], function (i18next, i18nextHttpBacke
325324
["activity/activity"],
326325
function () {
327326
// Activity loaded successfully
328-
console.log("Activity module loaded successfully");
329327
},
330328
function (err) {
331329
console.error("Failed to load activity/activity:", err);

0 commit comments

Comments
 (0)