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

Testing a Generic Repository

Arrange the steps for testing a generic repository:

Items to put in order

  • Add an element using repo.add()
  • Create a Repository<TestDino> instance
  • Retrieve an element using repo.findById()
  • Verify the retrieved element matches the added one

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