From 26f07cbc4d265d7ef4e682e175697da8cfbc5618 Mon Sep 17 00:00:00 2001 From: Siarhei Yelin Date: Fri, 29 Mar 2024 17:47:13 +0300 Subject: [PATCH] Use "test-ci" on CI. Use "test-watch" to run tests locally in watch mode. --- .github/workflows/base.yml | 2 +- .github/workflows/test.yml | 2 +- package.json | 1 + uui-build/scripts/runTests.js | 4 ---- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 364b95067c..d9ff3ab615 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -58,7 +58,7 @@ jobs: cd server && yarn - name: test - run: yarn test + run: yarn test-ci - name: eslint run: yarn eslint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8bcb05095a..a486dba33d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: yarn build cd server && yarn - name: test - run: yarn test + run: yarn test-ci - name: eslint run: yarn eslint diff --git a/package.json b/package.json index 71c54f7bdf..aab4f06ee9 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "stylelint": "yarn --cwd uui-build lint --stylelint", "stylelint-fix": "yarn stylelint --fix", "test": "node uui-build/scripts/runTests.js --config=./jest.config.js", + "test-watch": "yarn test --watchAll", "test-ci": "cross-env CI=true yarn test", "test-report": "yarn test --collectCoverage", "test-typecheck": "tsc --project ./tsconfig.test.json", diff --git a/uui-build/scripts/runTests.js b/uui-build/scripts/runTests.js index 5f4e692dd0..0df4689fcd 100644 --- a/uui-build/scripts/runTests.js +++ b/uui-build/scripts/runTests.js @@ -12,8 +12,4 @@ process.on('unhandledRejection', (err) => { const argv = process.argv.slice(2); -if (!process.env.CI && argv.indexOf('--collectCoverage') === -1) { - argv.push('--watchAll'); -} - jest.run(argv);