karma-better-sinon-chai
for Karma
Requirements
This Karma plugin requires Karma >=0.10
Installation
Install the module via npm
$ npm install --save-dev karma-better-sinon-chai
Add better-sinon-chai
to the frameworks
key in your Karma configuration:
module { config}
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'-> assertok'everything''everything is ok'; it 'should expose the Chai expect method'-> expect'foo'tonotequal 'bar' it 'should expose the Chai should property'-> 1shouldnotequal 2 shouldexist 123
Sinon and Chai matchers for Sinon are also available:
describe 'karma tests with sinon'-> it 'can spy on objects'-> foo = : -> sinonspy foo'bar' foobar 'baz' foobarshouldhavebeencalledWith 'baz'
Changelog
v1.1.0
- Fixed broken Sinon dependency
- Updated depenencies
- Chai:
~3.0 => ~3.2.0
- Sinon:
~1.15.0 => ~1.16.0
- Chai:
- Removed
lodash
dependency
v1.0.0
- Updated to broken sinon version. Probably doesnt work 💣.