2.0.2 • Published 7 years ago
karma-sinon-chai v2.0.2
karma-sinon-chai
for Karma
Requirements
This Karma plugin requires Karma >=0.10
Installation
Install the module via npm
$ npm install --save-dev karma-sinon-chaiAdd sinon-chai to the frameworks key in your Karma configuration:
module.exports = function(config) {
'use strict';
config.set({
frameworks: ['mocha', 'sinon-chai'],
# chai config
client: {
chai: {
includeStack: true
}
}
#...
});
}Usage
Each of the different Chai assertion suites is available in the tests:
describe 'karma tests with chai', ->
it 'should expose the Chai assert method', ->
assert.ok('everything', 'everything is ok');
it 'should expose the Chai expect method', ->
expect('foo').to.not.equal 'bar'
it 'should expose the Chai should property', ->
1.should.not.equal 2
should.exist 123Sinon and Chai matchers for Sinon are also available:
describe 'karma tests with sinon', ->
it 'can spy on objects', ->
foo = bar: ->
sinon.spy foo, 'bar'
foo.bar 'baz'
foo.bar.should.have.been.calledWith 'baz'Changelog
v2.0.0
- Removed
lolexdependency. Please use Sinon's fake timers instead, which uselolexunder the hood.
v1.1.0
- Fixed broken Sinon dependency
- Updated depenencies
- Chai:
~3.0 => ~3.2.0 - Sinon:
~1.15.0 => ~1.16.0
- Chai:
- Removed
lodashdependency
v1.0.0
- Updated to broken sinon version. Probably doesnt work :bomb:.
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.3.4
8 years ago
1.3.3
8 years ago
1.3.2
8 years ago
1.3.1
9 years ago
1.3.0
9 years ago
1.2.4
9 years ago
1.2.3
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
10 years ago
1.2.0-rc1
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago
0.3.2
10 years ago
0.3.1
10 years ago
0.3.0
11 years ago
0.2.0
11 years ago
0.1.6
12 years ago
0.1.5
12 years ago
0.1.4
12 years ago
0.1.3
12 years ago
0.1.2
12 years ago
0.1.1
12 years ago
0.1.0
12 years ago
0.0.0
12 years ago


