Skip to content

Commit eb4b6b4

Browse files
committed
test(react/dependency): restore intentional async keyword in activateAction
1 parent 7647031 commit eb4b6b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/react/dependency.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ it('should not call read function for unmounted atoms in StrictMode (#2076)', ()
950950
expect(firstDerivedFn).toBeCalledTimes(0)
951951
})
952952

953-
it('works with unused hook (#2554)', () => {
953+
it('works with unused hook (#2554)', async () => {
954954
const isFooAtom = atom(false)
955955
const isBarAtom = atom(false)
956956
const isActive1Atom = atom<boolean>((get) => {
@@ -959,7 +959,7 @@ it('works with unused hook (#2554)', () => {
959959
const isActive2Atom = atom<boolean>((get) => {
960960
return get(isFooAtom) && get(isActive1Atom)
961961
})
962-
const activateAction = atom(undefined, (_get, set) => {
962+
const activateAction = atom(undefined, async (_get, set) => {
963963
set(isFooAtom, true)
964964
set(isBarAtom, true)
965965
})

0 commit comments

Comments
 (0)