pbastowski / angular2-now

Angular 2 @Component syntax for Angular 1 apps
MIT License
145 stars 15 forks source link

Unit testing #38

Closed kamilkisiela closed 8 years ago

kamilkisiela commented 8 years ago

Hi, @pbastowski !

As i promised, here are tests with 75% code coverage.

You should be aware that I set npm package as private to prevent publishing.


I used:

Run tests on CI (you can also use it locally)

singleRun: true autowatch: false launcher: firefox

$ npm test

Run tests locally

singleRun: false autowatch: true launcher: chrome

$ npm run test:local

Update code coverage

I used coveralls.io just to have the view on code.

$ npm run coverage:coveralls


Travis:

I added example travis configuration

https://travis-ci.org/kamilkisiela/angular2-now

Code coverage:

https://coveralls.io/github/kamilkisiela/angular2-now

pbastowski commented 8 years ago

Hi Kamil. Anything wrong with the PR? I was going to merge it later today.

kamilkisiela commented 8 years ago

@pbastowski Oh, my mistake :)

pbastowski commented 8 years ago

Really nice work, Kamil. Thank you very much for doing this.

jacobdr commented 8 years ago

image

kamilkisiela commented 8 years ago

It's 85% code coverage now. It's mostly for basic functionality. The special cases need to be done.