Put in order · NestJS course · Module 7: Testing
Horizontal sorting: expect chain
Arrange the assertion checking an HTTP response in an E2E test:
Items to put in order
- .expect(res => expect(res.body).toHaveLength(3))
- .expect(200)
- .get('/legions')
- const response = await request(app.getHttpServer())
You can check the correct answer by solving this task in the CodeWorlds game.