Skip to content

Commit 219ce8c

Browse files
test(overmind): add test for lazy config
1 parent b4b5894 commit 219ce8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/node_modules/overmind/src/config/config.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ describe('Config', () => {
4141
state: {
4242
foo: 'bar',
4343
},
44+
actions: {
45+
returnStateFromB({ state }) {
46+
return state.configB.bar
47+
},
48+
},
4449
})
4550
const configB = () =>
4651
Promise.resolve({
@@ -68,6 +73,8 @@ describe('Config', () => {
6873
expect(app.state.configA.foo).toEqual('bar')
6974
// @ts-ignore
7075
expect(app.state.configB.bar).toEqual('baz')
76+
// @ts-ignore
77+
expect(app.actions.configA.returnStateFromB()).toEqual('baz')
7178
})
7279
})
7380

0 commit comments

Comments
 (0)