From 0b781552904dd502f55c0c2e2a44f0918951d5cb Mon Sep 17 00:00:00 2001 From: jade <101148768+jadeddelta@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:23:01 -0700 Subject: [PATCH] remove unnecessary helper function --- .../jspsych/tests/core/progressbar.test.ts | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/jspsych/tests/core/progressbar.test.ts b/packages/jspsych/tests/core/progressbar.test.ts index b83d96f993..5ceb35bbc4 100644 --- a/packages/jspsych/tests/core/progressbar.test.ts +++ b/packages/jspsych/tests/core/progressbar.test.ts @@ -3,11 +3,6 @@ import { pressKey, startTimeline } from "@jspsych/test-utils"; import { initJsPsych, JsPsych } from "../../src"; -// progress bar lives in the container element -const getContainer = (jsPsych: JsPsych) => { - return jsPsych.getDisplayContainerElement(); -} - describe("automatic progress bar", () => { test("progress bar does not display by default", async () => { const { jsPsych } = await startTimeline([ @@ -17,8 +12,8 @@ describe("automatic progress bar", () => { }, ]); - const displayContainer = getContainer(jsPsych); - expect(displayContainer.querySelector("#jspsych-progressbar-container")).toBeNull(); + expect(jsPsych.getDisplayContainerElement().querySelector("#jspsych-progressbar-container")) + .toBeNull(); await pressKey("a"); }); @@ -33,10 +28,10 @@ describe("automatic progress bar", () => { { show_progress_bar: true } ); - const displayContainer = getContainer(jsPsych); - expect(displayContainer.querySelector("#jspsych-progressbar-container").innerHTML).toMatch( - 'Completion Progress