Skip to content

Commit f2ca7ce

Browse files
authored
chore: Fix test commands (#460)
This PR improves the handling of test commands. The previous implementation broke support for passing arguments to the test command because it included a posttest script that automatically added a newline to vitest.config. However, this is already handled by the lint-staged step in the pre-push hook.
1 parent 4a8ef55 commit f2ca7ce

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/lint-build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
yarn build-release
150150
cd -
151151
- run: yarn build
152-
- run: yarn run test
152+
- run: yarn test:ci
153153
- name: Require clean working directory
154154
shell: bash
155155
run: |

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@
3131
"postinstall": "simple-git-hooks",
3232
"prepack": "./scripts/prepack.sh",
3333
"pretest": "bash scripts/reset-coverage-thresholds.sh",
34-
"posttest": "printf '\\n' >> vitest.config.ts",
35-
"test": "yarn pretest && vitest run && yarn posttest",
36-
"test:dev": "yarn pretest && vitest run --mode development && yarn posttest",
37-
"test:clean": "yarn test --no-cache --coverage.clean",
34+
"test": "yarn pretest && vitest run",
35+
"test:ci": "vitest run",
36+
"test:dev": "yarn test --mode development",
3837
"test:e2e": "yarn workspaces foreach --all run test:e2e",
3938
"test:e2e:ci": "yarn workspaces foreach --all run test:e2e:ci",
40-
"test:verbose": "yarn pretest && yarn test --reporter verbose && yarn posttest",
39+
"test:verbose": "yarn test --reporter verbose",
4140
"test:watch": "vitest",
4241
"why:batch": "./scripts/why-batch.sh"
4342
},

0 commit comments

Comments
 (0)