Skip to content

Commit

Permalink
fix to pass the test
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Mar 14, 2021
1 parent f42427f commit 6874262
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ const scheduleReadAtomState = <Value>(
): void => {
promise.then(() => {
readAtomState(state, atom, true)
flushPending(state)
})
}

Expand Down
4 changes: 4 additions & 0 deletions tests/async.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -572,4 +572,8 @@ it('a derived atom from a newly created async atom (#351)', async () => {
fireEvent.click(getByText('button'))
await findByText('loading')
await findByText('derived: 12, commits: 2')

fireEvent.click(getByText('button'))
await findByText('loading')
await findByText('derived: 13, commits: 3')
})

0 comments on commit 6874262

Please sign in to comment.