-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating vitest
to SDK
#1672
Migrating vitest
to SDK
#1672
Changes from all commits
c07dba8
80bee93
f0f82ec
0d36295
6af28e5
5eb6e53
e2efa42
dc83123
ba3e9bf
317eedf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
import matchers from '@testing-library/jest-dom/matchers' | ||
import { expect } from 'vitest' | ||
import { afterEach } from 'vitest' | ||
import { cleanup } from '@testing-library/react' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've updated the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running with the latest versions seems to work fine 👍 |
||
import '@testing-library/jest-dom/vitest' | ||
|
||
expect.extend(matchers) | ||
// runs a clean after each test case (e.g. clearing jsdom) | ||
afterEach(() => { | ||
cleanup(); | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/.wasp/ | ||
/.env.server | ||
/.env.client | ||
/node_modules/ | ||
node_modules/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vitest creates some cache files in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of running from the
.wasp/out
dir, it now runs from the Wasp project root dir.