All quizzes
Free quiz · 27 questions in the bank

Mocha quiz

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

Question 1/12Score 0

What does the `--require` flag do?

In this round
  1. What does the `--require` flag do?
  2. What is the difference between Mocha's BDD interface (`describe`/`it`) and TDD interface (`suite`/`test`)?
  3. What is `mocha.opts` (the legacy config approach) largely replaced by?
  4. How do you skip a test?
  5. How does Mocha handle a test that returns a Promise?
  6. How do you test an asynchronous operation using a callback?
  7. What is Mocha's `.mocharc.yml`/`.mocharc.json` used for?
  8. How do you run only a specific test or suite while developing?
  9. What does `--exit` do?
  10. What does the `--timeout` flag (or config option) control?
  11. How do you install Mocha and a common assertion library?
  12. How do you specify which test files Mocha should run?
Gaps to close?
Read the curated Mocha notes — core concepts, patterns, interview prep.
Mocha notes

More quizzes

.NETAccessibilityAgileAgile MethodologyAirflowAkka