mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
delete remove first node test
This commit is contained in:
parent
214fb77247
commit
e599088b47
@ -97,28 +97,6 @@ describe("Timeline", () => {
|
|||||||
expect(timeline.children).toEqual([expect.any(Trial), expect.any(Timeline)]);
|
expect(timeline.children).toEqual([expect.any(Trial), expect.any(Timeline)]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("respects dynamically removed first child node descriptions", async () => {
|
|
||||||
TestPlugin.setManualFinishTrialMode();
|
|
||||||
|
|
||||||
const timelineDescription: TimelineArray = [
|
|
||||||
{ type: TestPlugin },
|
|
||||||
{ timeline: [{ type: TestPlugin }] },
|
|
||||||
{ type: TestPlugin },
|
|
||||||
];
|
|
||||||
const timeline = createTimeline(timelineDescription);
|
|
||||||
|
|
||||||
const runPromise = timeline.run();
|
|
||||||
expect(timeline.children.length).toEqual(1);
|
|
||||||
|
|
||||||
timelineDescription.shift();
|
|
||||||
await TestPlugin.finishTrial();
|
|
||||||
await TestPlugin.finishTrial();
|
|
||||||
await runPromise;
|
|
||||||
|
|
||||||
expect(timeline.children.length).toEqual(2);
|
|
||||||
expect(timeline.children).toEqual([expect.any(Timeline), expect.any(Trial)]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("respects dynamically removed middle child node descriptions", async () => {
|
it("respects dynamically removed middle child node descriptions", async () => {
|
||||||
TestPlugin.setManualFinishTrialMode();
|
TestPlugin.setManualFinishTrialMode();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user