All quizzes
Free quiz · 37 questions in the bank

Vitest quiz

Test your Vitest knowledge with a free interactive quiz — 37 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What is a `.test.ts` (or `.spec.ts`) file naming convention used for with Vitest, by default?

In this round
  1. What is a `.test.ts` (or `.spec.ts`) file naming convention used for with Vitest, by default?
  2. How would you test an asynchronous function (returning a Promise) with Vitest?
  3. What is `expect()` used for in a Vitest assertion?
  4. What does `beforeEach()` do in a Vitest test file?
  5. What does the `environment` option in Vitest's config (e.g. `test: { environment: 'jsdom' }`) control?
  6. What is `test.each()` (or `it.each()`) used for in Vitest?
  7. What is the basic syntax for writing a test with Vitest?
  8. How do you run Vitest tests from the command line?
  9. What is `describe()` used for in a Vitest test file?
  10. How does Vitest's watch mode behave during active development?
  11. What is Vitest?
  12. How does Vitest's configuration typically integrate with an existing `vite.config.ts` file?
Gaps to close?
Read the curated Vitest notes — core concepts, patterns, interview prep.
Vitest notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web