From 2db9576a7661235a5b84d297705e69e23a5289d3 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Wed, 4 Sep 2024 15:10:21 +0200 Subject: [PATCH] Fix knip issues --- config/knip.ts | 5 +- unit-testing/vue/jsdom-environment.ts | 2 +- unit-testing/vue/package.json | 1 + yarn.lock | 110 ++++++++++++++++++++++++++ 4 files changed, 116 insertions(+), 2 deletions(-) diff --git a/config/knip.ts b/config/knip.ts index 8971f7f..017f2db 100644 --- a/config/knip.ts +++ b/config/knip.ts @@ -32,7 +32,10 @@ const config: KnipConfig = { "unit-testing/*": { entry, project }, "unit-testing/angular": { entry: ["components/*.ts", "setup.ts"], project }, "unit-testing/react": { entry: ["components/*.tsx", "setup.ts"], project }, - "unit-testing/vue": { entry: ["components/*.ts", "setup.ts"], project }, + "unit-testing/vue": { + entry: ["components/*.ts", "jsdom-environment.ts", "setup.ts"], + project, + }, }, }; diff --git a/unit-testing/vue/jsdom-environment.ts b/unit-testing/vue/jsdom-environment.ts index 3a7a9a5..5e94e7b 100644 --- a/unit-testing/vue/jsdom-environment.ts +++ b/unit-testing/vue/jsdom-environment.ts @@ -11,7 +11,7 @@ import type { import JSDOMEnvironment from "jest-environment-jsdom"; -export class MyJSDOMEnvironment extends JSDOMEnvironment.default { +class MyJSDOMEnvironment extends JSDOMEnvironment.default { constructor(config: JestEnvironmentConfig, context: EnvironmentContext) { super(config, context); diff --git a/unit-testing/vue/package.json b/unit-testing/vue/package.json index 6cdd774..242fc82 100644 --- a/unit-testing/vue/package.json +++ b/unit-testing/vue/package.json @@ -31,6 +31,7 @@ "vue-template-compiler": "^2.6.12" }, "devDependencies": { + "@jest/environment": "^29.7.0", "@siteimprove/alfa-future": "^0.81.0", "@siteimprove/alfa-jest": "^0.65.2", "@siteimprove/alfa-rules": "^0.81.0", diff --git a/yarn.lock b/yarn.lock index 653feb9..3e4b54d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -769,6 +769,18 @@ __metadata: languageName: node linkType: hard +"@jest/environment@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/environment@npm:29.7.0" + dependencies: + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-mock: ^29.7.0 + checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 + languageName: node + linkType: hard + "@jest/expect-utils@npm:^29.5.0": version: 29.5.0 resolution: "@jest/expect-utils@npm:29.5.0" @@ -802,6 +814,20 @@ __metadata: languageName: node linkType: hard +"@jest/fake-timers@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/fake-timers@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@sinonjs/fake-timers": ^10.0.2 + "@types/node": "*" + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 + languageName: node + linkType: hard + "@jest/globals@npm:^29.5.0": version: 29.5.0 resolution: "@jest/globals@npm:29.5.0" @@ -860,6 +886,15 @@ __metadata: languageName: node linkType: hard +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": ^0.27.8 + checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + "@jest/source-map@npm:^29.4.3": version: 29.4.3 resolution: "@jest/source-map@npm:29.4.3" @@ -945,6 +980,20 @@ __metadata: languageName: node linkType: hard +"@jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" + dependencies: + "@jest/schemas": ^29.6.3 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: a0bcf15dbb0eca6bdd8ce61a3fb055349d40268622a7670a3b2eb3c3dbafe9eb26af59938366d520b86907b9505b0f9b29b85cec11579a9e580694b87cd90fcc + languageName: node + linkType: hard + "@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": version: 0.3.3 resolution: "@jridgewell/gen-mapping@npm:0.3.3" @@ -1061,6 +1110,13 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 00bd7362a3439021aa1ea51b0e0d0a0e8ca1351a3d54c606b115fdcc49b51b16db6e5f43b4fe7a28c38688523e22a94d49dd31168868b655f0d4d50f032d07a1 + languageName: node + linkType: hard + "@sindresorhus/is@npm:^4.0.0": version: 4.0.0 resolution: "@sindresorhus/is@npm:4.0.0" @@ -7530,6 +7586,23 @@ __metadata: languageName: node linkType: hard +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" + dependencies: + "@babel/code-frame": ^7.12.13 + "@jest/types": ^29.6.3 + "@types/stack-utils": ^2.0.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 + pretty-format: ^29.7.0 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 + languageName: node + linkType: hard + "jest-mock@npm:^29.5.0": version: 29.5.0 resolution: "jest-mock@npm:29.5.0" @@ -7541,6 +7614,17 @@ __metadata: languageName: node linkType: hard +"jest-mock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-mock@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-util: ^29.7.0 + checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 + languageName: node + linkType: hard + "jest-pnp-resolver@npm:^1.2.2": version: 1.2.2 resolution: "jest-pnp-resolver@npm:1.2.2" @@ -7723,6 +7807,20 @@ __metadata: languageName: node linkType: hard +"jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca + languageName: node + linkType: hard + "jest-validate@npm:^29.5.0": version: 29.5.0 resolution: "jest-validate@npm:29.5.0" @@ -9415,6 +9513,17 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": ^29.6.3 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: 032c1602383e71e9c0c02a01bbd25d6759d60e9c7cf21937dde8357aa753da348fcec5def5d1002c9678a8524d5fe099ad98861286550ef44de8808cc61e43b6 + languageName: node + linkType: hard + "pretty-ms@npm:^7.0.0": version: 7.0.1 resolution: "pretty-ms@npm:7.0.1" @@ -11139,6 +11248,7 @@ __metadata: version: 0.0.0-use.local resolution: "unit-testing-vue@workspace:unit-testing/vue" dependencies: + "@jest/environment": ^29.7.0 "@siteimprove/alfa-future": ^0.81.0 "@siteimprove/alfa-jest": ^0.65.2 "@siteimprove/alfa-rules": ^0.81.0