{"id":14967475,"url":"https://github.com/kevicency/karma-sinon-chai","last_synced_at":"2025-10-01T05:30:47.576Z","repository":{"id":9847115,"uuid":"11840061","full_name":"kevicency/karma-sinon-chai","owner":"kevicency","description":"Karma + Mocha + Sinon + Chai = ❤","archived":false,"fork":true,"pushed_at":"2021-11-05T18:17:17.000Z","size":49,"stargazers_count":86,"open_issues_count":2,"forks_count":43,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-10T03:23:40.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xdissent/karma-chai","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevicency.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-02T09:39:56.000Z","updated_at":"2024-01-29T08:00:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kevicency/karma-sinon-chai","commit_stats":null,"previous_names":["kmees/karma-sinon-chai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevicency%2Fkarma-sinon-chai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevicency%2Fkarma-sinon-chai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevicency%2Fkarma-sinon-chai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevicency%2Fkarma-sinon-chai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevicency","download_url":"https://codeload.github.com/kevicency/karma-sinon-chai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234827057,"owners_count":18892884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:38:06.807Z","updated_at":"2025-10-01T05:30:47.207Z","avatar_url":"https://github.com/kevicency.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/karma-sinon-chai.png)](http://badge.fury.io/js/karma-sinon-chai) [![Dependency status](https://david-dm.org/xdissent/karma-chai.png)](https://david-dm.org/kmees/karma-sinon-chai) [![devDependency Status](https://david-dm.org/xdissent/karma-chai/dev-status.png)](https://david-dm.org/kmees/karma-sinon-chai#info=devDependencies)\n\nkarma-sinon-chai\n================\n\n  * [Sinon](http://sinonjs.org/)\n  * [Chai](http://chaijs.com)\n  * [Sinon-Chai](https://github.com/domenic/sinon-chai)\n\nfor [Karma](http://karma-runner.github.io)\n\nRequirements\n------------\n\nThis Karma plugin requires Karma `\u003e=0.10`\n\nInstallation\n------------\n\nInstall the module via npm\n\n```sh\n$ npm install --save-dev karma-sinon-chai\n```\n\nAdd `sinon-chai` to the `frameworks` key in your Karma configuration:\n\n```js\nmodule.exports = function(config) {\n  'use strict';\n  config.set({\n    frameworks: ['mocha', 'sinon-chai'],\n\n    # chai config\n    client: {\n      chai: {\n        includeStack: true\n      }\n    }\n\n    #...\n  });\n}\n```\n\nUsage\n-----\n\nEach of the different Chai assertion suites is available in the tests:\n\n```coffee\ndescribe 'karma tests with chai', -\u003e\n\n  it 'should expose the Chai assert method', -\u003e\n    assert.ok('everything', 'everything is ok');\n\n  it 'should expose the Chai expect method', -\u003e\n    expect('foo').to.not.equal 'bar'\n\n  it 'should expose the Chai should property', -\u003e\n    1.should.not.equal 2\n    should.exist 123\n```\n\nSinon and Chai matchers for Sinon are also available:\n\n```coffee\ndescribe 'karma tests with sinon', -\u003e\n\n  it 'can spy on objects', -\u003e\n    foo = bar: -\u003e\n    sinon.spy foo, 'bar'\n\n    foo.bar 'baz'\n\n    foo.bar.should.have.been.calledWith 'baz'\n```\n\nChangelog\n----------------\n### v2.0.0\n  * Removed `lolex` dependency. Please use [Sinon's fake timers](http://sinonjs.org/releases/v4.5.0/fake-timers/) instead, which use `lolex` under the hood.\n\n### v1.1.0\n  * Fixed broken Sinon dependency\n  * Updated depenencies\n      * Chai: `~3.0 =\u003e ~3.2.0`\n      * Sinon: `~1.15.0 =\u003e ~1.16.0`\n  * Removed `lodash` dependency\n\n### v1.0.0\n  * Updated to broken sinon version. Probably doesnt work :bomb:.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevicency%2Fkarma-sinon-chai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevicency%2Fkarma-sinon-chai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevicency%2Fkarma-sinon-chai/lists"}