Awesome Open Source
Awesome Open Source

Running Angular Tests with Webpack, Mocha, Chai and Sinon.

Using :

  • Angular v7+.

  • Webpack v4.26.0.

  • Jsdom v13.0.0.

  • Mocha-webpack for Node testing.

  • Mocha-loader for browser testing.

  • Chai, Chai-spies and Sinon for assertions, mocking, spying.

Clone the repo and do :

npm install

Launch Node tests with :

npm test

Launch Browser tests with :

npm run test:server 

=> Go to localhost:8888 to see the results.

Launch tests coverage with :

npm run test:coverage

To generate test and coverage reports, launch :

npm run test:reports

You can find some explaination here.

Hope that can help.


Alternatives To Angular Testing Webpack Mocha Chai Sinon
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Typescript (245,560
Testing (93,962
Angular (54,857
Webpack (23,625
Mocha (3,858
Chai (1,683
Sinon (479