Writing Acceptance Tests

You’ll learn how to write and use acceptance tests in an Ember.js app in this lesson.

Command to run tests

With the theory nailed down, it’s time to roll up our sleeves and get to work.

Tests can be run by issuing the ember test command, ember t for short, from the command line. This runs the whole test suite. If the --server switch is added, the tests are run in interactive mode, which opens a browser with the tests and reruns them each time we change the code. Therefore, we get the same developer experience of a tight feedback cycle, like working with the application in development mode.

So, let’s run the ember t --server command and see what it returns.

We have a single, auto-generated test that verifies that Ember.onerror works properly.

Get hands-on with 1200+ tech skills courses.