Skip to content

Commit

Permalink
Simplify out setting dataAtom
Browse files Browse the repository at this point in the history
  • Loading branch information
probeiuscorp committed Apr 30, 2024
1 parent 40a91b6 commit c90a840
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/vanilla/dependency.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ it('keeps atoms mounted between recalculations', async () => {
it.skipIf(!import.meta.env?.USE_STORE2)(
'should not provide stale values to conditional dependents',
() => {
const dataAtom = atom<number[]>([])
const dataAtom = atom<number[]>([100])
const hasFilterAtom = atom(false)
const filteredAtom = atom((get) => {
const data = get(dataAtom)
Expand All @@ -182,7 +182,6 @@ it.skipIf(!import.meta.env?.USE_STORE2)(
store.sub(filteredAtom, () => undefined)
store.sub(stageAtom, () => undefined)

store.set(dataAtom, [100])
expect(store.get(stageAtom), 'should start without filter').to.equal(
'no-filter',
)
Expand Down

0 comments on commit c90a840

Please sign in to comment.