Thanks, @lathonez! I’ve based all my testing code on your clicker repo code and it all works wonderfully - you have probably saved me tons of hours in getting testing + typescript + angular2 + ionic2 + coverage + … integrated.
I recently ran into a problem as soon as we had to add the line ‘import es6-shim’ to app.ts, as was recommended in this forum post (and as was needed otherwise I got errors, after starting to use the new ionic2 build process).
This causes PhantomJS to break with a 404 error complaining it cannot find ‘/base/es6-shim.js’.
The following fix worked (a fix to the clicker testing code, which is what I use, almost verbatum and which is in this repository.
Just change the file karma.config.js
in two places:
-
Add this line to the
files:
section:‘node_modules/es6-shim/es6-shim.js’
-
Add this line to the
proxies:
section:‘/base/es6-shim.js’: ‘/base/node_modules/es6-shim/es6-shim.js’