Skip to content

Commit

Permalink
fix CI hopefully 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Nov 10, 2023
1 parent 2e2dda6 commit eaa2e9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/async.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react/canary" />

import { StrictMode, Suspense, use } from 'react'
import ReactExports, { StrictMode, Suspense } from 'react'
import { fireEvent, render, waitFor } from '@testing-library/react'
import { it } from 'vitest'
import { proxy, useSnapshot } from 'valtio'
Expand All @@ -10,6 +10,7 @@ const sleep = (ms: number) =>
setTimeout(resolve, ms)
})

const { use } = ReactExports

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.9.7)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.0.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.7.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.1.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.8.3)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 13 in tests/async.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.2.3)

Property 'use' does not exist on type 'typeof React'.
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down
3 changes: 2 additions & 1 deletion tests/computed.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/// <reference types="react/canary" />

import { StrictMode, Suspense, use } from 'react'
import ReactExports, { StrictMode, Suspense } from 'react'
import { fireEvent, render } from '@testing-library/react'
import { memoize } from 'proxy-memoize'
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

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.9.7)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.0.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.7.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.1.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.8.3)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 10 in tests/computed.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.2.3)

Property 'use' does not exist on type 'typeof React'.
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down
3 changes: 2 additions & 1 deletion tests/derive.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react/canary" />

import { StrictMode, Suspense, use, useEffect, useRef } from 'react'
import ReactExports, { StrictMode, Suspense, useEffect, useRef } from 'react'
import { fireEvent, render } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { proxy, snapshot, subscribe, useSnapshot } from 'valtio'
Expand All @@ -13,6 +13,7 @@ const sleep = (ms: number) =>
setTimeout(resolve, ms)
})

const { use } = ReactExports

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.9.7)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.0.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.7.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.1.5)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (3.8.3)

Property 'use' does not exist on type 'typeof React'.

Check failure on line 16 in tests/derive.test.tsx

View workflow job for this annotation

GitHub Actions / test_matrix (4.2.3)

Property 'use' does not exist on type 'typeof React'.
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down

0 comments on commit eaa2e9c

Please sign in to comment.