I have my unit tests set up as shown in the Testing Guide
(https://angular.io/docs/ts/latest/testing/first-app-tests.html). Using
Angular 2.0.0-beta-0.
Tests are working but some tests run 3 times. (It seems like all tests run
3 times, except the last one loaded.) Anyone know why?
This can cause problems when testing something like a service, where the
first test run can pollute variables in the service, causing the 2nd and
3rd run to fail.
Unit tests HTML file is attached. Output from Jasmine looks like this:
9 specs, 0 failures
- Hero
- has name given in the constructor
- has id given in the constructor
- has power given in the constructor
- Hero
- has name given in the constructor
- has id given in the constructor
- has power given in the constructor
- Hero
- has name given in the constructor
- has id given in the constructor
- has power given in the constructor
- InitCapsPipe
- transforms "abc" to "Abc"
- transforms "abc def" to "Abc Def"
- leaves "Abc Def" unchanged
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Title: Jasmine Tests