Skip to content
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

Merged
merged 11 commits into from
Sep 17, 2024
Merged

Conversation

sean-brydon
Copy link
Member

@sean-brydon sean-brydon commented Sep 17, 2024

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

image

@graphite-app graphite-app bot requested a review from a team September 17, 2024 08:40
@sean-brydon sean-brydon changed the title feat: update vitest version v0.34 to V2.11 [Do not merge] feat: update vitest version v0.34 to V2.11 Sep 17, 2024
Copy link

graphite-app bot commented Sep 17, 2024

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.

@keithwillcode keithwillcode added consumer core area: core, team members only labels Sep 17, 2024
@dosubot dosubot bot added the ⬆️ dependencies Pull requests that update a dependency file label Sep 17, 2024
Copy link
Contributor

github-actions bot commented Sep 17, 2024

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:

No release type found in pull request title "[Do not merge] feat: update vitest version v0.34 to V2.11". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link

vercel bot commented Sep 17, 2024

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 0:11am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 0:11am

@graphite-app graphite-app bot requested a review from a team September 17, 2024 09:23
Copy link

socket-security bot commented Sep 17, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@humanwhocodes/module-importer@1.0.1 unsafe 0 21.2 kB nzakas
npm/@nodelib/fs.scandir@2.1.5 filesystem 0 22.2 kB mrmlnc
npm/@nodelib/fs.stat@2.0.5 filesystem 0 11.8 kB mrmlnc
npm/@nodelib/fs.walk@1.2.8 None 0 26.4 kB mrmlnc
npm/acorn-jsx@5.3.2 None 0 24.4 kB rreverser
npm/ajv@6.12.6 eval 0 929 kB esp
npm/ansi-styles@4.3.0 None 0 17 kB sindresorhus
npm/array-union@2.1.0 None 0 3.17 kB sindresorhus
npm/balanced-match@1.0.2 None 0 6.94 kB juliangruber
npm/callsites@3.1.0 None 0 6.33 kB sindresorhus
npm/chownr@2.0.0 filesystem 0 5.75 kB isaacs
npm/color-convert@2.0.1 None 0 27.2 kB qix
npm/cross-spawn@7.0.3 environment, filesystem, shell 0 21.2 kB satazor
npm/debug@4.3.4 environment 0 42.4 kB qix
npm/deep-is@0.1.4 None 0 8.11 kB thlorenz
npm/dir-glob@3.0.1 None 0 5.42 kB sindresorhus
npm/encoding@0.1.13 None 0 7.12 kB andris
npm/env-paths@2.2.1 None 0 10.2 kB sindresorhus
npm/err-code@2.0.3 None 0 12.3 kB achingbrain
npm/error-ex@1.3.2 None 0 9.04 kB qix
npm/esrecurse@4.3.0 None 0 13.5 kB michaelficarra
npm/estraverse@5.3.0 None 0 37.1 kB michaelficarra
npm/esutils@2.0.3 None 0 50.6 kB michaelficarra
npm/fast-deep-equal@3.1.3 None 0 13 kB esp
npm/fast-json-stable-stringify@2.1.0 None 0 17 kB esp
npm/fast-levenshtein@2.0.6 None 0 9.44 kB hiddentao
npm/find-up@5.0.0 None 0 11.8 kB sindresorhus
npm/globby@11.1.0 filesystem 0 21.8 kB sindresorhus
npm/graceful-fs@4.2.11 environment, filesystem 0 32.5 kB isaacs
npm/http-cache-semantics@4.1.1 None 0 35.9 kB kornel
npm/import-fresh@3.3.0 None 0 4.87 kB sindresorhus
npm/imurmurhash@0.1.4 None 0 11.9 kB jensyt
npm/indent-string@4.0.0 None 0 4.4 kB sindresorhus
npm/is-extglob@2.1.1 None 0 6.22 kB jonschlinkert
npm/is-fullwidth-code-point@3.0.0 None 0 4.99 kB sindresorhus
npm/is-glob@4.0.3 None 0 13.6 kB phated
npm/is-lambda@1.0.1 None 0 2.94 kB watson
npm/is-number@7.0.0 None 0 9.62 kB jonschlinkert
npm/is-path-inside@3.0.3 None 0 4.12 kB sindresorhus
npm/jose@4.15.9 network 0 549 kB panva
npm/js-tokens@4.0.0 None 0 15.1 kB lydell
npm/js-yaml@4.1.0 None 0 405 kB vitaly
npm/json-parse-even-better-errors@2.3.1 None 0 10.4 kB isaacs
npm/json-stable-stringify-without-jsonify@1.0.1 None 0 14.2 kB samn
npm/kind-of@6.0.3 None 0 22.8 kB doowb
npm/levn@0.4.1 None 0 24.9 kB gkz
npm/lines-and-columns@1.2.4 None 0 5.39 kB eventualbuddha
npm/locate-path@6.0.0 filesystem 0 7.02 kB sindresorhus
npm/lodash.merge@4.6.2 None 0 54.1 kB jdalton
npm/merge2@1.4.1 None 0 8.9 kB zensh
npm/micromatch@4.0.5 None 0 55.9 kB jonschlinkert
npm/minipass-flush@1.0.5 None 0 3.77 kB isaacs
npm/minipass-pipeline@1.2.4 None 0 7 kB isaacs
npm/minipass-sized@1.0.3 None 0 124 kB isaacs
npm/minizlib@2.1.2 None 0 17.3 kB isaacs
npm/mkdirp@1.0.4 environment, filesystem 0 19.1 kB isaacs
npm/ms@2.1.2 None 0 6.84 kB styfle
npm/nanoid@3.3.7 None 0 24.4 kB ai
npm/natural-compare@1.4.0 None 0 5.65 kB megawac
npm/negotiator@0.6.3 None 0 27.4 kB dougwilson
npm/normalize-path@3.0.0 None 0 9.22 kB jonschlinkert
npm/p-limit@3.1.0 None 0 7.75 kB sindresorhus
npm/p-locate@5.0.0 None 0 7.24 kB sindresorhus
npm/parent-module@1.0.1 None 0 3.92 kB sindresorhus
npm/parse-json@5.2.0 None 0 5.41 kB sindresorhus
npm/path-parse@1.0.7 None 0 4.51 kB jbgutierrez
npm/path-type@4.0.0 filesystem 0 5.41 kB sindresorhus
npm/picomatch@2.3.1 None 0 90 kB mrmlnc
npm/prelude-ls@1.2.1 None 0 36.7 kB gkz
npm/promise-retry@2.0.1 None 0 15.6 kB achingbrain
npm/queue-microtask@1.2.3 None 0 8.37 kB feross
npm/resolve-from@4.0.0 filesystem, unsafe 0 4.64 kB sindresorhus
npm/retry@0.12.0 None 0 32.2 kB tim-kos
npm/reusify@1.0.4 None 0 9.44 kB matteo.collina
npm/run-parallel@1.2.0 None 0 6.56 kB feross
npm/safer-buffer@2.1.2 None 0 42.3 kB chalker
npm/shebang-regex@3.0.0 None 0 2.83 kB sindresorhus
npm/slash@3.0.0 None 0 3.51 kB sindresorhus
npm/smart-buffer@4.2.0 None 0 138 kB joshglazebrook
npm/strip-json-comments@3.1.1 None 0 6.96 kB sindresorhus
npm/supports-preserve-symlinks-flag@1.0.0 None 0 9.18 kB ljharb
npm/text-table@0.2.0 None 0 11 kB substack
npm/to-regex-range@5.0.1 None 0 22.9 kB jonschlinkert
npm/tslib@2.6.2 None 0 84 kB typescript-bot
npm/type-check@0.4.0 None 0 21.2 kB gkz
npm/uri-js@4.4.1 None 0 470 kB garycourt
npm/util-deprecate@1.0.2 None 0 5.48 kB tootallnate

🚮 Removed packages: npm/@formkit/auto-animate@1.0.0-beta.5, npm/@types/chai-subset@1.3.3, npm/bcryptjs@2.4.3, npm/local-pkg@0.4.3, npm/strip-literal@1.0.1

View full report↗︎

@sean-brydon sean-brydon changed the title [Do not merge] feat: update vitest version v0.34 to V2.11 feat: update vitest version v0.34 to V2.11 Sep 17, 2024
"@types/jsdom": "^21.1.3",
"@types/jsonwebtoken": "^9.0.3",
"@vitest/ui": "^2.1.1",
Copy link
Member Author

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

Copy link
Member Author

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 }) => {
Copy link
Member Author

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 }) => {
Copy link
Member Author

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>();
Copy link
Member Author

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

Copy link
Contributor

github-actions bot commented Sep 17, 2024

E2E results are ready!

@sean-brydon sean-brydon merged commit e7415fe into main Sep 17, 2024
39 checks passed
@sean-brydon sean-brydon deleted the feat/update-vitest branch September 17, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only ⬆️ dependencies Pull requests that update a dependency file ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants