Skip to content
Myr

test(middleware/immer): add runtime tests for immer middleware (#3471)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* test(middleware/immer): add runtime tests for immer middleware * test(middleware/immer): rename non-function-updater test to describe produce bypass The previous name ("should merge state when given a non-function updater") implied merge semantics, which is vanilla setState's behavior. What the test actually exercises is immer.ts:79, where a non-function updater bypasses `produce`. Renaming to "should not apply produce when updater is not a function" per @sukvvon's review feedback.

authored by palkim · committed by GitHub · parent 3201328 · Browse files · 1 file+74 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+74 added−0 removed

  • tests:+74 added−0 removed

1 file+74 added−0 removed

added:tests/immer.test.tsx+74 added