Skip to content

Commit 4523750

Browse files
chore(deps): update jest to v6 (major) (#254)
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@testing-library/jest-dom](https://togithub.com/testing-library/jest-dom) | [`^5.16.5` -> `^6.0.0`](https://renovatebot.com/diffs/npm/@testing-library%2fjest-dom/5.17.0/6.1.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@testing-library%2fjest-dom/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@testing-library%2fjest-dom/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@testing-library%2fjest-dom/5.17.0/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@testing-library%2fjest-dom/5.17.0/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [eslint-plugin-testing-library](https://togithub.com/testing-library/eslint-plugin-testing-library) | [`^5.11.0` -> `^6.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-testing-library/5.11.1/6.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-testing-library/6.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-plugin-testing-library/6.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-plugin-testing-library/5.11.1/6.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-plugin-testing-library/5.11.1/6.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>testing-library/jest-dom (@&#8203;testing-library/jest-dom)</summary> ### [`v6.1.4`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.1.4) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.1.3...v6.1.4) ##### Bug Fixes - upgrade `@adobe/css-tools` to `4.3.1` to address vulnerability ([#&#8203;532](https://togithub.com/testing-library/jest-dom/issues/532)) ([44f1eab](https://togithub.com/testing-library/jest-dom/commit/44f1eabc79b848f45daffac21c5f7383424e893c)) ### [`v6.1.3`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.1.3) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.1.2...v6.1.3) ##### Bug Fixes - proper [@&#8203;jest/globals](https://togithub.com/jest/globals) import ([#&#8203;530](https://togithub.com/testing-library/jest-dom/issues/530)) ([5b492ac](https://togithub.com/testing-library/jest-dom/commit/5b492ace23d52b7cb7d3f91913ed0b5311905a26)) ### [`v6.1.2`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.1.2) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.1.1...v6.1.2) ##### Bug Fixes - bump [@&#8203;adobe/css-tools](https://togithub.com/adobe/css-tools) for ESM support ([#&#8203;525](https://togithub.com/testing-library/jest-dom/issues/525)) ([b959a68](https://togithub.com/testing-library/jest-dom/commit/b959a681386164bf5d64f5b2b9c8bf891301bc12)) ### [`v6.1.1`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.1.1) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.1.0...v6.1.1) ##### Bug Fixes - **package.json:** update main and module file paths ([#&#8203;523](https://togithub.com/testing-library/jest-dom/issues/523)) ([853a3e5](https://togithub.com/testing-library/jest-dom/commit/853a3e51ba6757a34780e32953525b6142eadcf9)) ### [`v6.1.0`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.1.0) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.0.1...v6.1.0) ##### Features - Publish ESM and CJS ([https://github.com/testing-library/jest-dom/pull/519](https://togithub.com/testing-library/jest-dom/pull/519)) ### [`v6.0.1`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.0.1) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v6.0.0...v6.0.1) ##### Bug Fixes - matchers type is making the global expect unsafe ([#&#8203;513](https://togithub.com/testing-library/jest-dom/issues/513)) ([bdb34f1](https://togithub.com/testing-library/jest-dom/commit/bdb34f12959578c77b18b0c0910d512768b20ab0)) ### [`v6.0.0`](https://togithub.com/testing-library/jest-dom/releases/tag/v6.0.0) [Compare Source](https://togithub.com/testing-library/jest-dom/compare/v5.17.0...v6.0.0) ##### Features - local types, supporting jest, [@&#8203;jest/globals](https://togithub.com/jest/globals), vitest ([#&#8203;511](https://togithub.com/testing-library/jest-dom/issues/511)) ([4b764b9](https://togithub.com/testing-library/jest-dom/commit/4b764b9f6a7b564d7f8ec0e9b0c6ba9cc875f2b8)) ##### BREAKING CHANGES - Removes the extend-expect script. Users should use the default import path or one of the new test platform-specific paths to automatically extend the appropriate "expect" instance. extend-expect was not documented in the Readme, so this change should have minimal impact. Users can now use the following import paths to automatically extend "expect" for their chosen test platform: - [@&#8203;testing-library/jest-dom](https://togithub.com/testing-library/jest-dom) - jest ([@&#8203;types/jest](https://togithub.com/types/jest)) - @&#8203;testing-library/jest-dom/jest-globals - [@&#8203;jest/globals](https://togithub.com/jest/globals) - @&#8203;testing-library/jest-dom/vitest - vitest For example: import '@&#8203;testing-library/jest-dom/jest-globals' Importing from one of the above paths will augment the appropriate matcher interface for the given test platform, assuming the import is done in a .ts file that is included in the user's tsconfig.json. It's also (still) possible to import the matchers directly without side effects: import \* as matchers from '@&#8203;testing-library/jest-dom/matchers' - Update kcd-scripts - Drop node < 14 </details> <details> <summary>testing-library/eslint-plugin-testing-library (eslint-plugin-testing-library)</summary> ### [`v6.2.0`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.2.0) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.1.2...v6.2.0) ##### Features - **prefer-presence-queries:** support react-native matcher `toBeOnTheScreen` ([#&#8203;844](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/844)) ([b9fef59](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/b9fef5991291fbd78f81a2a69f06007ff6ce6498)) ### [`v6.1.2`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.1.2) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.1.1...v6.1.2) ##### Bug Fixes - **await-async-events:** avoid reporting `userEvent.setup()` in wrappers ([#&#8203;834](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/834)) ([a1bb21e](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/a1bb21ea01e2a7cfa393e5e360aa3d620098efae)), closes [#&#8203;800](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/800) ### [`v6.1.1`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.1.1) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.1.0...v6.1.1) ##### Bug Fixes - handle multiple imports with `no-manual-cleanup` ([#&#8203;835](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/835)) ([cb84da2](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/cb84da25f60f1fbfae018e7dd803a353252292fc)) ### [`v6.1.0`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.1.0) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.0.2...v6.1.0) ##### Features - **prefer-implicit-assert:** adding new rule ([#&#8203;815](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/815)) ([56a1900](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/56a19006035530f20d41091c666b117ca216c1bf)), closes [#&#8203;743](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/743) ### [`v6.0.2`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.0.2) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.0.1...v6.0.2) ##### Bug Fixes - **await-async-events:** sync userEvent.setup() should not be reported ([#&#8203;817](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/817)) ([c0b6e6f](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/c0b6e6f11fc4c536ad45c98cb058daef82b58258)), closes [#&#8203;800](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/800) ### [`v6.0.1`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.0.1) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v6.0.0...v6.0.1) ##### Bug Fixes - **no-await-sync-events:** stop reporting `user-event` by default ([#&#8203;803](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/803)) ([88246fc](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/88246fca7919b06a00d0564913779db33de4de19)) ### [`v6.0.0`](https://togithub.com/testing-library/eslint-plugin-testing-library/releases/tag/v6.0.0) [Compare Source](https://togithub.com/testing-library/eslint-plugin-testing-library/compare/v5.11.1...v6.0.0) You can follow the [migration guide to v6](https://togithub.com/testing-library/eslint-plugin-testing-library/blob/main/docs/migration-guides/v6.md). ##### BREAKING CHANGES - **await-async-query:** `await-async-query` is now called `await-async-queries` - **no-await-sync-events:** `no-await-sync-events` is now enabled by default in the DOM, Angular & React configs - **no-await-sync-query:** `no-await-sync-query` is now called `no-await-sync-queries` - **no-debugging-utils:** `no-debugging-utils` now enables all debug methods in all configs by default - **no-node-access:** `no-node-access` is now enabled by default in the DOM config - **await-fire-event:** `await-fire-event` is now called `await-async-event` - **no-global-regexp-flag-in-query:** `no-global-regexp-flag-in-query` is now enabled by default in all configs - **no-manual-cleanup:** `no-manual-cleanup` is now enabled by default in the React & Vue configs - **no-render-in-setup:** `no-render-in-setup` is now called `no-render-in-lifecycle` - **prefer-wait-for:** `prefer-wait-for` is now removed ##### Bug Fixes - **await-async-event:** pluralize to await-async-events ([#&#8203;670](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/670)) ([7238f76](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/7238f76c44d026798c8ad7c41700a717a065aef6)) - **await-async-events:** improve fixer ([#&#8203;675](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/675)) ([9d5554c](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/9d5554cb6bd44f3dbb9e370d67b684b54010c704)) ##### Features - **await-async-event:** add basic fixer ([#&#8203;656](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/656)) ([b4b5394](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/b4b5394b18979e7fde175d36e0cbe9cec5fb2f85)) - **await-async-query:** rename to `await-async-queries` ([#&#8203;665](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/665)) ([c1803df](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/c1803df5e35188ed5fcaeaf45ebcea379fa36838)) - **await-fire-event:** rename to `await-async-event` + add support for `user-event` ([#&#8203;652](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/652)) ([b4ce9bb](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/b4ce9bb2ddec61f1790aa422412b3557f2baaf90)) - **no-await-sync-events:** add to DOM, Angular & React configs by default ([#&#8203;667](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/667)) ([afce5ea](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/afce5ea7888db3070711c39baf470e46a01f99a7)) - **no-await-sync-query:** rename to `no-await-sync-queries` ([#&#8203;666](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/666)) ([7ed3da8](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/7ed3da8ef5b454baea76f8f14465644311366270)) - **no-debugging-utils:** enable all debug methods in all configs by default ([#&#8203;663](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/663)) ([e394ce0](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/e394ce0962616e79d45b9abed8afead7e00f5d13)) - **no-debugging-utils:** warn instead of error in all configs ([#&#8203;662](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/662)) ([8063f8f](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/8063f8f6a8e1ed0304c6eefc3b00493997952cd1)) - **no-global-regexp-flag-in-query:** add to all configs by default ([#&#8203;660](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/660)) ([c76a7bf](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/c76a7bfa153d8f206bd88cd3928e3f8bd107be18)) - **no-manual-cleanup:** add to React & Vue configs by default ([#&#8203;659](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/659)) ([8f6ebf5](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/8f6ebf567b0e3bd136db3f917ef1ac6def5f14cb)) - **no-node-access:** add to DOM config by default ([#&#8203;661](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/661)) ([8dfe155](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/8dfe155f5658c14004c80ddef274171e1d2950b1)) - **no-render-in-setup:** rename to `no-render-in-lifecycle` ([#&#8203;649](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/649)) ([9acba43](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/9acba430da3729bf3e4c781d1b9d2f3ff3ed6962)) - **prefer-wait-for:** remove rule ([#&#8203;648](https://togithub.com/testing-library/eslint-plugin-testing-library/issues/648)) ([20f23ad](https://togithub.com/testing-library/eslint-plugin-testing-library/commit/20f23ad0810654ab046e7056560653c72274d50a)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/navapbc/template-application-nextjs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Sawyer <[email protected]>
1 parent 1d3b5d8 commit 4523750

File tree

6 files changed

+46
-45
lines changed

6 files changed

+46
-45
lines changed

app/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const createJestConfig = nextJest({
1010
/** @type {import('jest').Config} */
1111
const customJestConfig = {
1212
setupFilesAfterEnv: [
13-
"<rootDir>/tests/jest.setup.js",
13+
"<rootDir>/tests/jest.setup.ts",
1414
"<rootDir>/tests/jest-i18n.ts",
1515
],
1616
testEnvironment: "jsdom",

app/package-lock.json

Lines changed: 37 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@storybook/nextjs": "^7.6.0",
3838
"@storybook/react": "^7.6.0",
3939
"@testing-library/dom": "^9.0.1",
40-
"@testing-library/jest-dom": "^5.16.5",
40+
"@testing-library/jest-dom": "^6.0.0",
4141
"@testing-library/react": "^14.0.0",
4242
"@testing-library/user-event": "^14.4.3",
4343
"@types/jest": "^29.5.5",
@@ -53,7 +53,7 @@
5353
"eslint-plugin-jest": "^27.2.1",
5454
"eslint-plugin-jest-dom": "^5.0.1",
5555
"eslint-plugin-storybook": "^0.6.12",
56-
"eslint-plugin-testing-library": "^5.11.0",
56+
"eslint-plugin-testing-library": "^6.0.0",
5757
"i18next-browser-languagedetector": "^7.0.2",
5858
"i18next-http-backend": "^2.2.1",
5959
"i18next-resources-for-ts": "^1.3.0",

app/tests/jest.setup.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/tests/jest.setup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import "@testing-library/jest-dom";
2+
3+
import { toHaveNoViolations } from "jest-axe";
4+
5+
expect.extend(toHaveNoViolations);

app/tests/types/i18next.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ expect.extend({ toHaveI18nNamespaces });
3636

3737
describe("types/generated-i18n-bundle.ts", () => {
3838
it("includes all English namespaces", () => {
39-
// Not adding a type declaration for this matcher since it is only used in this test
39+
// @ts-expect-error - Not adding a type declaration for this matcher since it is only used in this test
4040
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
4141
expect(Object.keys(generatedEnglishResources)).toHaveI18nNamespaces(
4242
i18nConfig.ns

0 commit comments

Comments
 (0)