Skip to content

Commit

Permalink
delete remove first node test
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriechang committed Nov 5, 2024
1 parent 214fb77 commit e599088
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions packages/jspsych/src/timeline/Timeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,6 @@ describe("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 () => {
TestPlugin.setManualFinishTrialMode();

Expand Down

0 comments on commit e599088

Please sign in to comment.