Making the First Test Pass

In this lesson, you’ll learn how to set up and use Mirage to pass the acceptance test.

We'll cover the following

Installing Mirage

As with all add-ons, the first step is to use ember install to add them to the project using following command:

ember install ember-cli-mirage

This creates an empty config file under mirage/config.js to which we need to add the route handlers. These route handlers should replicate the corresponding API endpoint’s behavior.

Let’s delete the comments in the file and add a couple of handlers for band-related requests: