JavaScript Testing for Pythonistas (Fast Track) 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

A developer with a clipboard checks a testing machine that inspects code cards under a lens, with PASS and FAIL lamps, an ASSERT gauge, a MOCK robot, and an AWAIT clock.

Course

JavaScript Testing for Pythonistas (Fast Track)

Port a ski-hire shop's pytest suite to JavaScript in this shorter course, and learn to test with Node's built-in runner, from assertions and many cases to async tests and mocks.

intermediate py testing