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

Testing a TypeScript Class

Arrange the elements of a test throwing an exception in a TypeScript class:

Items to click

  • ).toThrow('Enclosure is full')
  • () =>
  • expect(
  • enclosure.addDinosaur(extra)

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