In order to see a real testing example, we will create a simple application. This app will merely greet a user and display the topic currently learning. These two pieces of data, the username and topic, will be persisted as bindable entities and we will call this component info-box
. We will develop an application similar to the following mock-up:
We will use the Aurelia CLI to generate our Aurelia application. Aurelia configures the project to work with the Karma test runner and the Jasmine testing framework and uses Chrome as the default web browser.
To create our application, open your Terminal and in the working directory you prefer, run the following command and accept the defaults:
$ au new aurelia-testapp
The preceding command will create a new directory called aurelia-testapp
; let's get into this folder and launch the application by running the following command:
$ cd aurelia-testapp $ au run --watch ... Finished...