From 49a1e72e05907a6fc0bda321576ac0dcb1e3c56d Mon Sep 17 00:00:00 2001 From: Fernando Belmonte Archetti <110430578+farchettiensis@users.noreply.github.com> Date: Mon, 2 Mar 2026 05:48:44 -0300 Subject: [PATCH] fix(curriculum): make step 3 state tests order-agnostic (#65516) --- .../680fc849a6f2be0a8597c593.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/english/blocks/workshop-superhero-application-form/680fc849a6f2be0a8597c593.md b/curriculum/challenges/english/blocks/workshop-superhero-application-form/680fc849a6f2be0a8597c593.md index a33a69a0db2..f76fb100596 100644 --- a/curriculum/challenges/english/blocks/workshop-superhero-application-form/680fc849a6f2be0a8597c593.md +++ b/curriculum/challenges/english/blocks/workshop-superhero-application-form/680fc849a6f2be0a8597c593.md @@ -38,7 +38,8 @@ Your `useState` hook for `powerSource` should have an initial value of empty str const _a = eval(script); const _b = await __helpers.prepTestComponent(exports.SuperheroForm); - assert.strictEqual(abuseState.calls[2]?.[0], ""); + const newStateCalls = abuseState.calls.slice(2); + assert.isTrue(newStateCalls.some(call => call[0] === "")); ``` You should use array destructuring to set a `powers` state variable and a `setPowers` setter. @@ -68,9 +69,8 @@ Your `useState` hook for `powers` should have an initial value of empty array. const _a = eval(script); const _b = await __helpers.prepTestComponent(exports.SuperheroForm); - console.log("State calls:", abuseState.calls) - - assert.deepEqual(abuseState.calls[3]?.[0], []); + const newStateCalls = abuseState.calls.slice(2); + assert.isTrue(newStateCalls.some(call => Array.isArray(call[0]) && call[0].length === 0)); ``` # --seed--