Laura10101 / contractor-tax-calculator

0 stars 2 forks source link

Parent state is null after calling setParentState in config app #195

Closed Laura10101 closed 10 months ago

Laura10101 commented 10 months ago

● App state management › Parent state management › should correctly set then clear the parent state

expect(received).toBe(expected) // Object.is equality

Expected: "create"
Received: null

  56 |         test("should correctly set then clear the parent state", () => {
  57 |             setParentState(dialogStates.modes.create, dialogStates.entityTypes.booleanQuestion, { test: "test" });
> 58 |             expect(app.parentState.mode).toBe(dialogStates.modes.create);
Laura10101 commented 10 months ago

setParentState was setting the dialog state, rather than the parent state. Updated the function accordingly.