Testing · Senior · Question 31 of 75
What is in-source testing in Vitest?
- ✓Correct answer: Tests written in the same file as the code inside
if (import.meta.vitest), removed from the production build - 2Running tests against source maps
- 3A mode where tests are generated from comments
Explanation
Handy for small private helpers; the bundler strips the block via define: { "import.meta.vitest": "undefined" }.