Add the XHR test which uses API mock server.
Add the script to execute tests.
Define npm test.