Karma

Karma is a test runner or environment for running tests that can be used with testing frameworks like Mocha and Jasmine.

  • Karma

    • Browser-based testing

    • Spawns a web server and executes source code against test code

    • Configuration file (usually karma.conf.js) specifies which files to watch

    • Triggers tests whenever files change

    • Reports results back to the server

    • Developed by the Angular team

    • Install (globally): npm install -g karma-cli

    • Install (in project): npm install karma@latest –save-dev

    • Initialize (in project): karma init

Last updated

Was this helpful?