diff --git a/tests/async.test.tsx b/tests/async.test.tsx index 9b5eb2db..d5401619 100644 --- a/tests/async.test.tsx +++ b/tests/async.test.tsx @@ -10,7 +10,7 @@ const sleep = (ms: number) => setTimeout(resolve, ms) }) -const { use } = ReactExports +const { use } = ReactExports as any // for TS < 4.3 FIXME later type Awaited = T extends Promise ? V : T // for TS < 4.5 FIXME later const use2 = (x: T): Awaited => (x instanceof Promise ? use(x) : x) @@ -124,7 +124,7 @@ it.skipIf(typeof use === 'undefined')( } ) -it('delayed falsy value', async () => { +it.skipIf(typeof use === 'undefined')('delayed falsy value', async () => { const state = proxy({ value: true }) const delayedValue = () => { state.value = sleep(300).then(() => null) diff --git a/tests/computed.test.tsx b/tests/computed.test.tsx index ce4892d0..7b7d0e33 100644 --- a/tests/computed.test.tsx +++ b/tests/computed.test.tsx @@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { proxy, snapshot, subscribe, useSnapshot } from 'valtio' import { addComputed, proxyWithComputed, subscribeKey } from 'valtio/utils' -const { use } = ReactExports +const { use } = ReactExports as any // for TS < 4.3 FIXME later type Awaited = T extends Promise ? V : T // for TS < 4.5 FIXME later const use2 = (x: T): Awaited => (x instanceof Promise ? use(x) : x) diff --git a/tests/derive.test.tsx b/tests/derive.test.tsx index a6240684..76dfcea9 100644 --- a/tests/derive.test.tsx +++ b/tests/derive.test.tsx @@ -13,7 +13,7 @@ const sleep = (ms: number) => setTimeout(resolve, ms) }) -const { use } = ReactExports +const { use } = ReactExports as any // for TS < 4.3 FIXME later type Awaited = T extends Promise ? V : T // for TS < 4.5 FIXME later const use2 = (x: T): Awaited => (x instanceof Promise ? use(x) : x)