I'm working on a project with Node.js/angular4 and I'm newbie on testing so my question is if it's possible to test angular by mocha and chai because it come by default by jasmine so if yes. can you tell me how ?
Asked
Active
Viewed 3,572 times
2
-
Possible duplicate of [Testing Angular 2 service with mocha](https://stackoverflow.com/questions/40933065/testing-angular-2-service-with-mocha) – Estus Flask Dec 22 '17 at 16:24
-
Yes. Search google for "angular 4 mocha and chai tests", note what works in Angular 2 will generally work as well in 4. – scrappedcola Dec 22 '17 at 16:24
-
Since Mocha runner runs in Node, you may consider running tests in Karma+Mocha setup. – Estus Flask Dec 22 '17 at 16:25
1 Answers
0
Yes, you can. You need to delete everything about Jasmine en package.json, karma.conf.js and the types in tsconfig.spec.json. Then install all necessary for to work with mocha and chai.

Andres Carrasquilla
- 29
- 1