From 1735c4e28dfe8cb161e612fadb953d1153529117 Mon Sep 17 00:00:00 2001 From: Cherrie Chang Date: Tue, 5 Nov 2024 12:10:40 -0500 Subject: [PATCH] fix "dynamically remove first node after running it" test warning --- packages/jspsych/src/timeline/Timeline.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/jspsych/src/timeline/Timeline.spec.ts b/packages/jspsych/src/timeline/Timeline.spec.ts index 398e8574ff..1a660fd7ba 100644 --- a/packages/jspsych/src/timeline/Timeline.spec.ts +++ b/packages/jspsych/src/timeline/Timeline.spec.ts @@ -139,7 +139,8 @@ describe("Timeline", () => { expect(timeline.children.length).toEqual(3); expect(timeline.children[0].getDataParameter().I).toEqual(0); - expect(timeline.children[1].description.timeline[0]).toHaveProperty("data.I", 1); + const secondChildDescription = timeline.children[1].description as TimelineDescription; + expect(secondChildDescription["timeline"][0]).toHaveProperty("data.I", 1); expect(timeline.children[2].getDataParameter().I).toEqual(3); });