From 336c0968e3c9ac69aff90c750f3092a10f057aba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:47:15 +0000 Subject: [PATCH 1/3] chore(deps): update jest to v6 --- app/package-lock.json | 74 +++++++++++++++++++++---------------------- app/package.json | 4 +-- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 0ad521ad..e5507b84 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -24,7 +24,7 @@ "@storybook/nextjs": "^7.6.0", "@storybook/react": "^7.6.0", "@testing-library/dom": "^9.0.1", - "@testing-library/jest-dom": "^5.16.5", + "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.5", @@ -40,7 +40,7 @@ "eslint-plugin-jest": "^27.2.1", "eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-storybook": "^0.6.12", - "eslint-plugin-testing-library": "^5.11.0", + "eslint-plugin-testing-library": "^6.0.0", "i18next-browser-languagedetector": "^7.0.2", "i18next-http-backend": "^2.2.1", "i18next-resources-for-ts": "^1.3.0", @@ -8506,14 +8506,13 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", - "integrity": "sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", @@ -8522,9 +8521,29 @@ "redent": "^3.0.0" }, "engines": { - "node": ">=8", + "node": ">=14", "npm": ">=6", "yarn": ">=1" + }, + "peerDependencies": { + "@jest/globals": ">= 28", + "@types/jest": ">= 28", + "jest": ">= 28", + "vitest": ">= 0.32" + }, + "peerDependenciesMeta": { + "@jest/globals": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "jest": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { @@ -9060,15 +9079,6 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "node_modules/@types/testing-library__jest-dom": { - "version": "5.14.6", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.6.tgz", - "integrity": "sha512-FkHXCb+ikSoUP4Y4rOslzTdX5sqYwMxfefKh1GmZ8ce1GOkEHntSp6b5cGadmNfp5e4BMEWOMx+WSKd5/MqlDA==", - "dev": true, - "dependencies": { - "@types/jest": "*" - } - }, "node_modules/@types/tough-cookie": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", @@ -13904,9 +13914,9 @@ } }, "node_modules/eslint-plugin-testing-library": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz", - "integrity": "sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz", + "integrity": "sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.58.0" @@ -30953,14 +30963,13 @@ } }, "@testing-library/jest-dom": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", - "integrity": "sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, "requires": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", @@ -31459,15 +31468,6 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "@types/testing-library__jest-dom": { - "version": "5.14.6", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.6.tgz", - "integrity": "sha512-FkHXCb+ikSoUP4Y4rOslzTdX5sqYwMxfefKh1GmZ8ce1GOkEHntSp6b5cGadmNfp5e4BMEWOMx+WSKd5/MqlDA==", - "dev": true, - "requires": { - "@types/jest": "*" - } - }, "@types/tough-cookie": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", @@ -35155,9 +35155,9 @@ } }, "eslint-plugin-testing-library": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz", - "integrity": "sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz", + "integrity": "sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.58.0" diff --git a/app/package.json b/app/package.json index 825e93fb..55d3bc90 100644 --- a/app/package.json +++ b/app/package.json @@ -37,7 +37,7 @@ "@storybook/nextjs": "^7.6.0", "@storybook/react": "^7.6.0", "@testing-library/dom": "^9.0.1", - "@testing-library/jest-dom": "^5.16.5", + "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.5", @@ -53,7 +53,7 @@ "eslint-plugin-jest": "^27.2.1", "eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-storybook": "^0.6.12", - "eslint-plugin-testing-library": "^5.11.0", + "eslint-plugin-testing-library": "^6.0.0", "i18next-browser-languagedetector": "^7.0.2", "i18next-http-backend": "^2.2.1", "i18next-resources-for-ts": "^1.3.0", From 8518a743842fca187315a506f3cdce672287393a Mon Sep 17 00:00:00 2001 From: Sawyer Date: Tue, 28 Nov 2023 18:53:01 -0800 Subject: [PATCH 2/3] Fix types --- app/jest.config.js | 2 +- app/tests/jest.setup.js | 4 ---- app/tests/jest.setup.ts | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 app/tests/jest.setup.js create mode 100644 app/tests/jest.setup.ts diff --git a/app/jest.config.js b/app/jest.config.js index 501b6ddf..79bbe6e3 100644 --- a/app/jest.config.js +++ b/app/jest.config.js @@ -10,7 +10,7 @@ const createJestConfig = nextJest({ /** @type {import('jest').Config} */ const customJestConfig = { setupFilesAfterEnv: [ - "/tests/jest.setup.js", + "/tests/jest.setup.ts", "/tests/jest-i18n.ts", ], testEnvironment: "jsdom", diff --git a/app/tests/jest.setup.js b/app/tests/jest.setup.js deleted file mode 100644 index 4b8d9e26..00000000 --- a/app/tests/jest.setup.js +++ /dev/null @@ -1,4 +0,0 @@ -require("@testing-library/jest-dom"); -const { toHaveNoViolations } = require("jest-axe"); - -expect.extend(toHaveNoViolations); diff --git a/app/tests/jest.setup.ts b/app/tests/jest.setup.ts new file mode 100644 index 00000000..ce69f56e --- /dev/null +++ b/app/tests/jest.setup.ts @@ -0,0 +1,5 @@ +import "@testing-library/jest-dom"; + +import { toHaveNoViolations } from "jest-axe"; + +expect.extend(toHaveNoViolations); From 9c178dd97285b6e00f64751db88c186651c9850b Mon Sep 17 00:00:00 2001 From: Sawyer Date: Tue, 28 Nov 2023 18:56:30 -0800 Subject: [PATCH 3/3] Fix ignored ts error --- app/tests/types/i18next.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/types/i18next.test.ts b/app/tests/types/i18next.test.ts index f087582f..cb9f3c77 100644 --- a/app/tests/types/i18next.test.ts +++ b/app/tests/types/i18next.test.ts @@ -36,7 +36,7 @@ expect.extend({ toHaveI18nNamespaces }); describe("types/generated-i18n-bundle.ts", () => { it("includes all English namespaces", () => { - // Not adding a type declaration for this matcher since it is only used in this test + // @ts-expect-error - Not adding a type declaration for this matcher since it is only used in this test // eslint-disable-next-line @typescript-eslint/no-unsafe-call expect(Object.keys(generatedEnglishResources)).toHaveI18nNamespaces( i18nConfig.ns