Skip to content

Commit

Permalink
fix display_clear bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw committed Jan 14, 2024
1 parent ba39cca commit d2d1809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/plugin-visual-search-circle/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ describe("visual-search-circle", () => {
pressKey("a");
await expectFinished();

expect(displayElement.querySelectorAll("img").length).toBe(0);

expect(getData().values()[0].correct).toBe(true);
});

Expand Down Expand Up @@ -57,6 +59,8 @@ describe("visual-search-circle", () => {
jest.runAllTimers();
await expectFinished();

expect(displayElement.querySelectorAll("img").length).toBe(0);

expect(getData().values()[0].correct).toBe(true);
});
});
Expand Down
2 changes: 2 additions & 0 deletions packages/plugin-visual-search-circle/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ class VisualSearchCirclePlugin implements JsPsychPlugin<Info> {
};

const end_trial = () => {
display_element.innerHTML = "";

this.jsPsych.pluginAPI.clearAllTimeouts();
this.jsPsych.pluginAPI.cancelAllKeyboardResponses();

Expand Down

0 comments on commit d2d1809

Please sign in to comment.