Skip to content

Commit 2b205c5

Browse files
committed
test(reactant-module): add testing for initStateKey
1 parent a1e5c11 commit 2b205c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/reactant-module/test/index.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
computed,
99
inject,
1010
ModuleRef,
11+
initStateKey,
1112
} from '..';
1213

1314
test('base module with @state and @action', () => {
@@ -98,6 +99,7 @@ test('base module with @state and @action', () => {
9899
{ count: 1, others: { list: [0] } },
99100
{ list: [] },
100101
]);
102+
expect((counter as any)[initStateKey].count).toBe(0);
101103
});
102104

103105
test('base module with ModuleRef', () => {

0 commit comments

Comments
 (0)