From 75f407c0ba71056034a678e10331a65a46fd489c Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 3 Jun 2024 14:48:18 -0700 Subject: [PATCH] Use vitest workspace to run all the tests (#3448) Co-authored-by: Mark Cowlishaw --- package.json | 5 +++-- pnpm-lock.yaml | 24 +++++------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index b563077a97..043e84aab0 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "purge": "rimraf --glob \"packages/*/node_modules/\"", "regen-docs": "pnpm -r --parallel --aggregate-output --reporter=append-only run regen-docs", "regen-samples": "pnpm -r run regen-samples", - "test:ci": "pnpm -r --aggregate-output --reporter=append-only --sequential test:ci", + "test": "vitest run", + "test:ci": "vitest run --coverage --reporter=junit --reporter=default", "test:e2e": "pnpm -r run test:e2e", - "test": "pnpm -r --aggregate-output --reporter=append-only run test", "update-latest-docs": "pnpm -r run update-latest-docs", "watch": "tsc --build ./tsconfig.ws.json --watch", "sync-labels": "tsx ./eng/common/scripts/labels/sync-labels.ts --config ./eng/common/config/labels.ts" @@ -46,6 +46,7 @@ "@types/node": "~18.11.19", "@typescript-eslint/parser": "^7.9.0", "@typescript-eslint/utils": "^7.9.0", + "@vitest/coverage-v8": "^1.6.0", "c8": "^9.1.0", "cspell": "^8.8.1", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa3d5a7f2a..55b73b2754 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,9 @@ importers: '@typescript-eslint/utils': specifier: ^7.9.0 version: 7.9.0(eslint@8.57.0)(typescript@5.4.5) + '@vitest/coverage-v8': + specifier: ^1.6.0 + version: 1.6.0(vitest@1.6.0) c8: specifier: ^9.1.0 version: 9.1.0 @@ -2068,14 +2071,6 @@ packages: js-tokens: 4.0.0 picocolors: 1.0.1 - /@babel/parser@7.24.4: - resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.24.5 - dev: true - /@babel/parser@7.24.5: resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} engines: {node: '>=6.0.0'} @@ -3331,15 +3326,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/types@7.24.0: - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.24.5 - to-fast-properties: 2.0.0 - dev: true - /@babel/types@7.24.5: resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} @@ -8791,8 +8777,8 @@ packages: /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.5