jpmorganchase / mosaic

https://mosaic-mosaic-dev-team.vercel.app
https://mosaic-mosaic-dev-team.vercel.app
Apache License 2.0
21 stars 20 forks source link

Migrate to vitest #648

Closed joshwooding closed 2 months ago

joshwooding commented 2 months ago

This PR replaces jest with vitest, which improves ESM support in the test and means a lot less setup is needed. It also removes a lot of dependencies included with jest.

Workflow of some of the changes:

  1. add vitest import to test, import used functions e.g. describe, test, expect
  2. Replace jest.mock with vi.mock, update actualImport with vitests way.

I've also updated how msw was used, to be consistent across all test files.

Outstanding issues

WorkerSubscription.test.ts doesn't work (require's complex mocking that doesn't seem to be working)

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
mosaic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 1:11pm
changeset-bot[bot] commented 2 months ago

⚠️ No Changeset found

Latest commit: a7bffe8cfe21fd47833b53898d8c44b04382e03d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

mark-tate commented 2 months ago

of some concern is our app router branch @DavieReid