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/5Score 0

What does the `environment` option in Vitest's config (e.g. `test: { environment: 'jsdom' }`) control?

Questions in this quiz
  1. What does the `environment` option in Vitest's config (e.g. `test: { environment: 'jsdom' }`) control?
  2. What is `test.skip()` (or `it.skip()`) used for in Vitest?
  3. What is the difference between `.toBe()` and `.toEqual()` as Vitest matchers?
  4. What is `test.each()` (or `it.each()`) used for in Vitest?
  5. What does `.toBeNull()` and `.toBeUndefined()` check, as Vitest matchers?
  6. How would you test an asynchronous function (returning a Promise) with Vitest?
  7. What is the purpose of `vi.fn()` in Vitest?
  8. How does Vitest's configuration typically integrate with an existing `vite.config.ts` file?
  9. What is Vitest?
  10. What is the purpose of `.toThrow()` as a Vitest matcher?
  11. How does Vitest's watch mode behave during active development?
  12. What is a `.test.ts` (or `.spec.ts`) file naming convention used for with Vitest, by default?
Gaps to close?
Read the curated Vitest notes — core concepts, patterns, interview prep.
Vitest notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web