Migrating unit and e2e tests (beta4 und angular2.beta13) but having problems with zone.js


#1

Hi,

I am migrating the great seed project “clicker” with unit and e2e test to the latest versions, because I use it as a base for my app.
But I got into issues with zone.js:

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR EXCEPTION: TypeError: undefined is not a constructor (evaluating 'self._config.getBoolean('tapPolyfill')') in [null] ORIGINAL EXCEPTION: TypeError: undefined is not a constructor (evaluating 'self._config.getBoolean('tapPolyfill')') ORIGINAL STACKTRACE:

I checked all the topics here about the migration and used the latest app base as a base for the migration. I also tried to load the new angular2-polyfills.jsin the karma setup, but it did not help.

The errors can be reproduced in the branch of my fork:

git clone https://github.com/mavogel/clicker.git git checkout ionicBeta4AndAngularBeta14-migration npm install npm test

Some tests pass and some fail. That’s weird. The same with the e2e tests.

  1. Does anyone has an idea or experience with the new zone.js api and test infrastructure? Because that’s currently beyond my knowledge…
  2. Will the ionic team provide a test infrastructure in one of the ionic2 example apps for typescript? :smiley:

Kind Regards Manuel


#2

The creator of the project I wanted to migrate did it on his own :slight_smile: I don’t know how, because I’m still learning JS…
Take a look at clicker