From 944a291045f3ff12ef1cc3a09df1c5a87f4a9ab1 Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Wed, 1 Nov 2023 13:19:52 +0100 Subject: [PATCH] added test tasks for single packages and coverage task Signed-off-by: Jonah Iden --- package.json | 3 ++- packages/sprotty-elk/package.json | 1 + packages/sprotty-protocol/package.json | 1 + packages/sprotty/package.json | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index be0ff6a7..8119347f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "prepare": "lerna run prepare", "clean": "lerna run clean", "build": "lerna run build", - "test": "vitest", + "test": "vitest run", + "coverage": "vitest run --coverage", "publish:prepare": "lerna version --ignore-scripts --yes --no-push", "publish:latest": "lerna publish from-git --yes --no-push", "publish:next": "SHA=$(git rev-parse --short HEAD) && lerna publish preminor --exact --canary --preid next.${SHA} --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes --no-verify-access" diff --git a/packages/sprotty-elk/package.json b/packages/sprotty-elk/package.json index aaead26b..130f4e9e 100644 --- a/packages/sprotty-elk/package.json +++ b/packages/sprotty-elk/package.json @@ -31,6 +31,7 @@ "prepare": "yarn run clean && yarn run build", "clean": "rimraf lib artifacts", "build": "tsc -p ./tsconfig.json && yarn run lint", + "test": "vitest run --config ../../vite.config.ts", "watch": "tsc -w -p ./tsconfig.json", "lint": "eslint -c ../../configs/.eslintrc.js \"src/**/!(*.spec.ts*)\"" }, diff --git a/packages/sprotty-protocol/package.json b/packages/sprotty-protocol/package.json index 3af4b98e..0d7248d4 100644 --- a/packages/sprotty-protocol/package.json +++ b/packages/sprotty-protocol/package.json @@ -26,6 +26,7 @@ "prepare": "yarn run clean && yarn run build", "clean": "rimraf lib artifacts", "build": "tsc -p ./tsconfig.json && yarn run lint", + "test": "vitest run --config ../../vite.config.ts", "watch": "tsc -w -p ./tsconfig.json", "lint": "eslint -c ../../configs/.eslintrc.js \"src/**/!(*.spec.ts*)\"" }, diff --git a/packages/sprotty/package.json b/packages/sprotty/package.json index 1845d82d..2b06fa9e 100644 --- a/packages/sprotty/package.json +++ b/packages/sprotty/package.json @@ -42,6 +42,7 @@ "prepare": "yarn run clean && yarn run build", "clean": "rimraf lib artifacts", "build": "tsc -p ./tsconfig.json && yarn run lint", + "test": "vitest run --config ../../vite.config.ts", "watch": "tsc -w -p ./tsconfig.json", "lint": "eslint -c ../../configs/.eslintrc.js \"src/**/!(*.spec.ts*|test-helper.ts)\"" },