lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 137 forks source link

Running tests once #210

Closed mebibou closed 7 years ago

mebibou commented 7 years ago

When running the tests once without modifying the app src files, we could serve the files statically so that we wouldn't have to do ionic serve, something like this in protractor.conf.js:

  beforeLaunch: function() {
    require('ts-node').register({
      project: 'e2e'
    });

    require('connect')().use(require('serve-static')('www')).listen(8100, function() {
      console.log('Ionic App ready');
    });
  }
lathonez commented 7 years ago

This looks really cool, thank you.

I will have a play with it and get back to you.

On Mon, 16 Jan 2017 at 19:05, Guillaume notifications@github.com wrote:

When running the tests once without modifying the app src files, we could serve the files statically so that we wouldn't have to do ionic serve, something like this in protractor.conf.js:

beforeLaunch: function() {

require('ts-node').register({

  project: 'e2e'

});

require('connect')().use(require('serve-static')('www')).listen(8100, function() {

  console.log('Ionic App ready');

});

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/210, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSDUtNy8otBmUqK8mi_l9ciHilzG-ks5rSyTBgaJpZM4LkRbd .