Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H committed Jun 25, 2024
1 parent 5892a3a commit 578c37f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('libGD.js - GDJS Async Code Generation integration tests', function ()
const generateAndRunEventsForLayout = (events, logCode = false) => {
const { runtimeScene, runCompiledEvents } = generateEventsForLayout(
events,
(logCode = false)
logCode
);
runCompiledEvents();
return runtimeScene;
Expand Down Expand Up @@ -376,7 +376,7 @@ describe('libGD.js - GDJS Async Code Generation integration tests', function ()
});

it('can execute async events without side effect on local variables of the scene', function () {
// Reproduce a bug where the async events were not clearing
// Try to reproduce a bug where the async events were not clearing
// the local variable stack.
// Local variables declarations were added over a not empty stack
// whereas actions, conditions and expressions were still using
Expand Down Expand Up @@ -435,6 +435,10 @@ describe('libGD.js - GDJS Async Code Generation integration tests', function ()
runtimeScene.getAsyncTasksManager().markAllFakeAsyncTasksAsFinished();
runtimeScene.getAsyncTasksManager().processTasks(runtimeScene);

// This test can't actually reproduce the issue because
// `runCompiledEvents()` instantiate `gdjs.SceneCode.localVariables`
// at every call.

// Run scene events a second time.
runCompiledEvents();
expect(
Expand Down

0 comments on commit 578c37f

Please sign in to comment.