Put in order · Angular course · Module 11: Testing

Injecting a mock class

Arrange the provider that replaces the service with a mock class (one line):

Items to put in order

  • SamuraiService,
  • useClass:
  • MockSamuraiService }
  • { provide:

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