April 2017
Beginner to intermediate
378 pages
7h 57m
English
To start the execution process, we will add a script to the package.json file, so we can run tests easily by executing npm test from the command prompt/terminal.
Open package.json and add the following line to the scripts section:
"test": "karma start --reporters html ./test-config/karma.conf.js"
Now run the following command:
npm test
And you should see a browser launch and our test case execute. The command prompt/terminal log should look something like this:
todoapp_v2 npm test> ionic-hello-world@ test /chapter9/todoapp_v2> karma start --reporters html ./test-config/karma.conf.jswebpack: Compiled successfully.webpack: Compiling...ts-loader: Using typescript@2.0.9 and /chapter9/todoapp_v2/tsconfig.jsonwebpack: ...
Read now
Unlock full access