From 4e524106730010c0274f70423700f88df01aba99 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 4 Sep 2024 20:43:35 +0700 Subject: [PATCH] chore: add test:coverage step --- jest.config.js | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..eb1aab657 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,3 @@ +module.exports = { + projects: ['/core', '/web'], +} diff --git a/package.json b/package.json index c86405182..2785ee3b5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ }, "scripts": { "lint": "yarn workspace jan lint && yarn workspace @janhq/web lint", - "test:unit": "yarn workspace @janhq/core test", + "test:unit": "jest", + "test:coverage": "jest --coverage --collectCoverageFrom='src/**/*.{ts,tsx}'", "test": "yarn workspace jan test:e2e", "test-local": "yarn lint && yarn build:test && yarn test", "pre-install:darwin": "find extensions -type f -path \"**/*.tgz\" -exec cp {} pre-install \\;",