Skip to content

Commit

Permalink
test: improve coverage (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
yc-kanyun authored Dec 26, 2024
1 parent eda8d0b commit 4c9c901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ccstate/src/core/__tests__/ccstate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ test('get read deps', () => {
const derived$ = computed((get) => {
return Object.assign(get(base$), { b: 1 });
});
expect(store.getReadDependencies(derived$)).toEqual([derived$]);
store.get(derived$);
expect(store.getReadDependencies(derived$)).toEqual([derived$, [base$]]);
});
Expand Down
1 change: 1 addition & 0 deletions packages/ccstate/src/core/__tests__/dependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ it('do not keep atoms mounted between async recalculations', async () => {
});

const store = createDebugStore();
expect(store.getReadDependents(base)).toEqual([base]);
store.sub(
derived,
command(() => void 0),
Expand Down

0 comments on commit 4c9c901

Please sign in to comment.