All quizzes
Free quiz · 21 questions in the bank

Jasmine quiz

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

Question 1/5Score 0

What does `expect(asyncValue).toBeResolvedTo(expectedValue)` (an async matcher available in modern Jasmine) allow you to test?

Questions in this quiz
  1. What does `expect(asyncValue).toBeResolvedTo(expectedValue)` (an async matcher available in modern Jasmine) allow you to test?
  2. What is a Jasmine "spy" (created via `spyOn()`), and what is it used for?
  3. What is Jasmine's relationship to the Karma test runner in a typical Angular project setup?
  4. What is Jasmine, in the context of JavaScript testing?
  5. What does `spyOn(obj, "methodName").and.returnValue(42)` do?
  6. What does the "BDD" (Behavior-Driven Development) label commonly applied to Jasmine actually refer to, in terms of how tests are written?
  7. What does `jasmine.createSpyObj("serviceName", ["method1", "method2"])` do?
  8. What does `expect(value).toBeTruthy()` (versus `toBe(true)`) check in Jasmine?
  9. What is a "matcher" in Jasmine (like `toBe`, `toEqual`, `toContain`, `toBeTruthy`)?
  10. How would you mark a test as intentionally skipped (not run) in Jasmine, without deleting it?
  11. What is the purpose of `beforeEach()` and `afterEach()` in a Jasmine test suite?
  12. What is "Jasmine Clock" (`jasmine.clock()`) used for?
Gaps to close?
Read the curated Jasmine notes — core concepts, patterns, interview prep.
Jasmine notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web