sanity-io / react-rx

React + RxJS = <3
https://react-rx.dev
MIT License
47 stars 8 forks source link

chore: run tests both with and without react compiler #152

Closed bjoerge closed 4 weeks ago

bjoerge commented 4 weeks ago

Adds a vitest workspace config allowing us to run unit test against both react compiler optimized and non-optimized targets. Should not require any change to CI setup since CI is already running pnpm test

Example output:

> react-rx@4.1.2 test ~/react-rx
> vitest run --typecheck

Testing types with tsc and vue-tsc is an experimental feature.
Breaking changes might not follow SemVer, please pin Vitest's version when using it.

 RUN  v2.1.4 ~/react-rx

 ✓ |default| src/__tests__/errors.test.tsx (1)
 ✓ |react-compiler| src/__tests__/errors.test.tsx (1)
 ✓ |default| src/__tests__/strictmode.test.ts (3)
 ✓ |react-compiler| src/__tests__/strictmode.test.ts (3)
 ✓ |default| src/__tests__/useObservable.test.ts (15)
 ✓ |react-compiler| src/__tests__/useObservable.test.ts (15)

 Test Files  6 passed (6)
      Tests  38 passed (38)
   Start at  18:33:29
   Duration  1.45s (transform 2.15s, setup 0ms, collect 3.99s, tests 161ms, environment 2.98s, prepare 369ms)
vercel[bot] commented 4 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-rx ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 10:30am