node package manager


Expect.js adapter for Karma


You should use it only if you want run tests in IE8 and lower, otherwise consider karma-chai-plugins, which provides more complete Chai assertions as well as additional plugins.

Install the module from npm:

$ npm install karma-expect --save-dev

Add expect to the frameworks key in your Karma configuration:

module.exports = function(karma) {
    // frameworks to use 
    frameworks: ['mocha', 'expect']
    // ... 

Expect.js assertions are available in the tests:

describe('karma tests with expect', function() {
  it('should expose expect method', function() {