All quizzes
Free quiz · 20 questions in the bank

Chai quiz

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

Question 1/5Score 0

How do you negate a Chai assertion?

Questions in this quiz
  1. How do you negate a Chai assertion?
  2. How would you assert that an array has a specific length using Chai?
  3. What is Chai?
  4. What does `expect(obj).to.have.keys("a", "b")` check?
  5. What does `expect(obj).to.have.property("name", "Ada")` check?
  6. What does `expect(value).to.equal(other)` check, and how does it differ from `.to.eql(other)`?
  7. What does `expect(fn).to.throw("specific message")` check, versus `expect(fn).to.throw(SomeErrorClass)`?
  8. What does `expect(array).to.include(value)` check?
  9. What is the difference between `expect(value).to.be.null` and `expect(value).to.not.exist`?
  10. What does `expect(number).to.be.above(5)` (or its alias `.gt(5)`) check?
  11. What are Chai plugins (like `chai-as-promised` or `sinon-chai`) used for?
  12. What is the difference between `.deep.equal()` and `.equal()` when comparing two objects?
Gaps to close?
Read the curated Chai notes — core concepts, patterns, interview prep.
Chai notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web