We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e716d8 commit 606fe9cCopy full SHA for 606fe9c
packages/node_modules/overmind/src/index.test.ts
@@ -394,6 +394,25 @@ describe('Overmind', () => {
394
})
395
expect(app.state.foo).toBe('bar2')
396
397
+ test('should rehydrate actions on hot reload', () => {
398
+ expect.assertions(2)
399
+ const app = createDefaultOvermind()
400
+ const changeFoo = app.actions.changeFoo
401
+ app.reconfigure({
402
+ state: {
403
+ foo: 'bar2'
404
+ },
405
+ actions: {
406
+ changeFoo(context) {
407
+ context.state.foo = 'replaced!'
408
+ }
409
410
+ })
411
+
412
+ expect(app.state.foo).toBe('bar2')
413
+ changeFoo()
414
+ expect(app.state.foo).toBe('replaced!')
415
416
417
418
describe('Overmind mock', () => {
0 commit comments