karma-chai
Chai for Karma
Last updated 6 years ago by alexgorbatchev .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-chai 
SYNC missed versions from official npm registry.

karma-chai

Chai for Karma

NPM version Dependency status devDependency Status

Installation

Install the plugin from npm:

$ npm install karma-chai --save-dev

Or from Github:

$ npm install 'git+https://github.com/xdissent/karma-chai.git' --save-dev

Add chai to the frameworks key in your Karma configuration:

module.exports = (config) ->
  config.set

    # frameworks to use
    frameworks: ['mocha', 'chai']

    # ...

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 123

License

The MIT License (MIT)

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

3 Versions

  • 0.1.0                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Downloads
Today 0
This Week 321
This Month 3,500
Last Day 10
Last Week 1,347
Last Month 5,769
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (201)

Copyright 2014 - 2016 © taobao.org |