adjust tests to work with cleanup

This commit is contained in:
Josh de Leeuw 2024-07-11 17:17:55 -04:00
parent 06b082a977
commit 313edc2af5
2 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,7 @@ test("if on_finish returns a Promise, wait for resolve before showing end messag
const { getHTML, expectFinished, expectRunning } = await startTimeline(timeline, jsPsych);
expect(getHTML()).toMatch("foo");
pressKey("a");
await pressKey("a");
expect(getHTML()).not.toMatch("foo");
expect(getHTML()).not.toMatch("bar");

View File

@ -38,6 +38,8 @@ export class TimelineNodeDependenciesMock implements TimelineNodeDependencies {
getDefaultIti = jest.fn(() => 0);
finishTrialPromise = new PromiseWrapper<TrialResult>();
clearAllTimeouts = jest.fn();
}
/**