fix two-level merging of state in tests

This commit is contained in:
David Lechner
2021-01-23 15:46:20 -06:00
parent dcaf9f6ff4
commit 5d9040647b
+4 -1
View File
@@ -72,7 +72,10 @@ export class AsyncSaga {
}
public updateState(state: RecursivePartial<RootState>): void {
this.state = { ...this.state, ...state };
for (const key of Object.keys(state) as Array<keyof RootState>) {
// @ts-expect-error: writing to readonly for testing
this.state[key] = { ...this.state[key], ...state[key] };
}
}
public async end(): Promise<void> {