-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
feat: update vitest version v0.34 to V2.11 #16676
Conversation
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (09/17/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (09/17/24)1 reviewer was added to this PR based on Keith Williams's automation. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
"@types/jsdom": "^21.1.3", | ||
"@types/jsonwebtoken": "^9.0.3", | ||
"@vitest/ui": "^2.1.1", |
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.
Dev dep to get a lovely UI for running tests https://vitest.dev/guide/ui
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.
These dont need object containing as theyre exact matches
@@ -16,14 +16,13 @@ const _testWithAndWithoutOrg = ( | |||
const t = mode === "only" ? test.only : mode === "skip" ? test.skip : test; | |||
t( | |||
`${description} - With org`, | |||
async ({ emails, sms, meta, task, onTestFailed, expect, skip }) => { |
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.
Meta is no longer coming from the base vitest test -
@@ -16,14 +16,13 @@ const _testWithAndWithoutOrg = ( | |||
const t = mode === "only" ? test.only : mode === "skip" ? test.skip : test; | |||
t( | |||
`${description} - With org`, | |||
async ({ emails, sms, meta, task, onTestFailed, expect, skip }) => { | |||
async ({ emails, sms, task, onTestFailed, expect, skip, onTestFinished }) => { |
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.
We need to include onTestFinished now when expanding base fixtures
@@ -14,5 +14,5 @@ beforeEach(() => { | |||
mockReset(prisma); | |||
}); | |||
|
|||
const prisma = mockDeep<PrismaClient>(); |
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.
Weirdly - TS infering this was a massive performance hit. Casting it to the same type seemed to fix some of my issues
E2E results are ready! |
Updates vitest version from V0.34 to V2.11
.toContains
has breaking changes - we now have to.toEqual(expect.objectContaining(...))
.toContains
now only check if a array includes a value