How do I ensure pretest/posttest scripts run when I run a suite from the VS code interface? #612
-
I have some setup and teardown scripts that I run with my integration tests, for starting/stopping the database. My package.json has the scripts: {
"pretest": "npm run docker:up-test && npm run build -w packages/backend",
"test": "vitest",
"posttest": "npm run docker:down"
} When I run |
Beta Was this translation helpful? Give feedback.
Answered by
sheremet-va
May 1, 2025
Replies: 1 comment 7 replies
-
You can call them in |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
westhom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can call them in
globalSetup
: https://vitest.dev/config/#globalsetup