2.0.2 • Published 6 years ago

karma-sinon-chai v2.0.2

Weekly downloads
63,565
License
MIT
Repository
github
Last release
6 years ago

NPM version Dependency status devDependency Status

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-chai

Add 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 123

Sinon 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 lolex dependency. Please use Sinon's fake timers instead, which use lolex under the hood.

v1.1.0

  • Fixed broken Sinon dependency
  • Updated depenencies
    • Chai: ~3.0 => ~3.2.0
    • Sinon: ~1.15.0 => ~1.16.0
  • Removed lodash dependency

v1.0.0

  • Updated to broken sinon version. Probably doesnt work :bomb:.
peach-cliclouds-uieduiyii-vue-uivbt@infinitebrahmanuniverse/nolb-karma-s@everything-registry/sub-chunk-2006zhao-123wa.component.validatorwa.validator2xin-ui20210822xdc-karmavue-click-to-edit@mass-ui/sshellreact-boilerplate-app-scriptsreact-es6-starterqueo-blendidqueo-gulp-starterproto-mvcproto-lib-mvcrio-karmasynaptic-scouttmp.component.validatorrupert-gruntshenxin-uisky-toolbeltsyn-dev-toolstestfullunit-envv-ui-1-1vue-cli-plugin-ui-karmadevstack-tools@krakenjs/karma-config-grumblerdsv-clidynaware-gulp-tasks@getbeyond/beyond-cligoodeggs-karmagrumbler-scriptsfreshes-manfront-test-1garlictech-workflows-clientcx-vue-webpck-clielectrode-bolt@rubik-ui/hjlicx4hw-javascript-sdkembedit-devstack-toolsdaqioepay-sparta-servicegulp-core-build-karmagulu-ui-by-vuegulu-harderkai-01@fabwcie/ckeditor5-preview@sweet-weex/weex-cli-service@sweexui/weex-cli-servicekfs-doc@trinitymirrordigital/karma-webpack-setup@triotech/vue-corebgood-cliblackjack-toolbeltbolt-standard-fluxmy-tnm-2js-stack.taskslll-ui-1lucas-karmaceri-dev-serveratool-test-karmalygt-testaframe-render-order-componentaframe-proxemic-componentaframe-entity-slider-componentaframe-foo-componentaframe-webcentric-componentaframe-midi-componentaframe-google-poly-componentaframe-loader-3dtiles-componentaframe-loader-laz-component@ckeditor/ckeditor5-dev-tests@ckeditor/ckeditor5-package-toolsboar-tasksboar-tasks-clientbio-scaffold-wdui1000-packages@xilution/xilution-ui-build@xilution/xilution-web-client-build@vue2do/test@yuqigui1083/yvue-ui@zalastax/nolb-karma-sangular-emoji-pickerangular-emoji-picker-extendedbrain-vue-clinva-testcooking-karmapipe-contractpipe-core
2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.3.4

6 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.2.0-rc1

8 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.0

11 years ago