JavaScript Testing for Pythonistas Quiz
Interactive Quiz ⋅ 8 Questions
By Stephen Gruppetta
In this quiz, you’ll test your understanding of JavaScript Testing for Pythonistas.
By working through this quiz, you’ll revisit how a pytest suite ports to Node’s
built-in test runner: test files that node --test finds, assert.deepStrictEqual()
for arrays and objects, assert.throws() with an arrow, one test() per case,
hooks and the test context in place of fixtures, await assert.rejects() for async
code, and mocks through t.mock.
Most questions show a short test and ask what it does in JavaScript, where a pytest habit would lead you to expect something else. Good luck!
The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
JavaScript Testing for Pythonistas
Port a ski-hire shop's pytest suite to JavaScript, and learn to test with Node's built-in runner: assertions, errors, many cases, shared setup, async code, and mocks.