mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
fix display_clear bug
This commit is contained in:
parent
ba39cca0da
commit
d2d180967a
@ -27,6 +27,8 @@ describe("visual-search-circle", () => {
|
|||||||
pressKey("a");
|
pressKey("a");
|
||||||
await expectFinished();
|
await expectFinished();
|
||||||
|
|
||||||
|
expect(displayElement.querySelectorAll("img").length).toBe(0);
|
||||||
|
|
||||||
expect(getData().values()[0].correct).toBe(true);
|
expect(getData().values()[0].correct).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,6 +59,8 @@ describe("visual-search-circle", () => {
|
|||||||
jest.runAllTimers();
|
jest.runAllTimers();
|
||||||
await expectFinished();
|
await expectFinished();
|
||||||
|
|
||||||
|
expect(displayElement.querySelectorAll("img").length).toBe(0);
|
||||||
|
|
||||||
expect(getData().values()[0].correct).toBe(true);
|
expect(getData().values()[0].correct).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -166,6 +166,8 @@ class VisualSearchCirclePlugin implements JsPsychPlugin<Info> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const end_trial = () => {
|
const end_trial = () => {
|
||||||
|
display_element.innerHTML = "";
|
||||||
|
|
||||||
this.jsPsych.pluginAPI.clearAllTimeouts();
|
this.jsPsych.pluginAPI.clearAllTimeouts();
|
||||||
this.jsPsych.pluginAPI.cancelAllKeyboardResponses();
|
this.jsPsych.pluginAPI.cancelAllKeyboardResponses();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user