Reputation: 1224
Ionic2 was written with typescript and based on angular2. Is it possible to write unit test and e2e test for this? If it's possible, how can we do it?
Sorry for my test framework knowledge, I don't have much experience in karma and jasmine.
Upvotes: 5
Views: 2113
Reputation: 2733
Here is "A ionic 2 (Ionic rc0) boilerplate for starting new projects. This boilerplate will follow the best practices for angular and ionic development."
It gives you all these available NPM scripts commands :
dev
: run ionic servebuild
: Full production build. Use flag for dev build.release
: generate changelog based on commitspush
: shortcut for git push origin master --follow-tagslint
: lint with tslintscss-lint
: lint scsstest
: runs Karma teste2e
: runs e2e protractor testse2e:interactive
: runs e2e protractor tests in interactive modedocs
: not working yetoutdated
: search npm packages for outdated dependenciesios:dev
: build .ipa using dev environment varsios:release
: build .ipa with production environment varsandroid:dev
: build .apk using dev environment varsandroid:release
: build .apk with production environment varsIt is in development but I already thank Marco Turi for that!
Upvotes: 1
Reputation: 714
My colleague has created a simple "Counter" style app with karma/jasmine tests.
Check it out here: https://github.com/lathonez/clicker
Updated to ionic2 (2.0.0-beta.0) and Angular2 (2.0.0-beta.3) - give it a try and open an issue if you need assistance.
Upvotes: 6