Put in order · JavaScript and TypeScript course · Module 11: Testing with Jest

Test with Exception Syntax

Arrange the elements of a test checking for an exception:

Items to put in order

  • () => feedDino(
  • 'Unknown', 'meat')
  • ).toThrow('Unknown species')
  • expect(

You can check the correct answer by solving this task in the CodeWorlds game.