{"id":14989739,"url":"https://github.com/princed/karma-chai-plugins","last_synced_at":"2025-10-04T11:30:07.823Z","repository":{"id":9893089,"uuid":"11898601","full_name":"princed/karma-chai-plugins","owner":"princed","description":"Chai browser plugins set for Karma","archived":false,"fork":false,"pushed_at":"2021-07-01T08:14:45.000Z","size":84,"stargazers_count":30,"open_issues_count":3,"forks_count":20,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T00:19:32.123Z","etag":null,"topics":["assertions","chai","karma","karma-plugin","sinon"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/princed.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-05T13:16:40.000Z","updated_at":"2024-01-29T07:58:10.000Z","dependencies_parsed_at":"2022-09-10T12:50:28.354Z","dependency_job_id":null,"html_url":"https://github.com/princed/karma-chai-plugins","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fkarma-chai-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fkarma-chai-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fkarma-chai-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fkarma-chai-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princed","download_url":"https://codeload.github.com/princed/karma-chai-plugins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501245,"owners_count":21114637,"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":["assertions","chai","karma","karma-plugin","sinon"],"created_at":"2024-09-24T14:18:50.968Z","updated_at":"2025-10-04T11:30:02.740Z","avatar_url":"https://github.com/princed.png","language":"JavaScript","readme":"karma-chai-plugins\n==================\n\n\u003e [Chai](http://chaijs.com) browser plugins set for [Karma](http://karma-runner.github.io)\n\n[![Dependency Status](https://img.shields.io/david/princed/karma-chai-plugins.svg?style=flat-square)](https://david-dm.org/princed/karma-chai-plugins) [![Greenkeeper badge](https://badges.greenkeeper.io/princed/karma-chai-plugins.svg)](https://greenkeeper.io/)\n [![Current version](https://img.shields.io/npm/v/karma-chai-plugins.svg?style=flat-square)](https://www.npmjs.com/package/karma-chai-plugins) [![NPM downloads](https://img.shields.io/npm/dt/karma-chai-plugins.svg?style=flat-square)](https://www.npmjs.com/package/karma-chai-plugins) [![Travis Build Status](https://img.shields.io/travis/princed/karma-chai-plugins.svg?style=flat-square)](https://travis-ci.org/princed/karma-chai-plugins) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/princed/karma-chai-plugins.svg?style=flat-square)](https://ci.appveyor.com/project/princed/karma-chai-plugins)\n\nInstallation\n------------\n\nInstall the `karma-chai-plugins`:\n\n```sh\n$ npm install karma-chai-plugins --save-dev\n```\n\nAdd `chai` and plugins you need to the `frameworks` key in your Karma configuration:\n\n```coffee\nmodule.exports = (config) -\u003e\n  config.set\n\n    # frameworks to use\n    frameworks: ['mocha', 'chai', 'chai-as-promised']\n\n    # ...\n```\n\nBundled plugins\n---------------\n\n* [chai](http://chaijs.com)\n* [chai-as-promised](http://chaijs.com/plugins/chai-as-promised)\n* [chai-dom](http://chaijs.com/plugins/chai-dom) (do not use with chai-jquery)\n* [chai-jquery](http://chaijs.com/plugins/chai-jquery) (jQuery should be included manually)\n* [sinon-chai](http://chaijs.com/plugins/sinon-chai) (sinon will be included automatically)\n* [chai-things](http://chaijs.com/plugins/chai-things)\n\nNote: for using sinon, it is sufficient to add `sinon-chai` in karma frameworks. No need to add `sinon`.\n\nBrowser support\n---------------\n\nSame as [Chai.js](http://chaijs.com/guide/installation/#browser-section): IE 9+, Chrome 7+, FireFox 4+, Safari 5+ except `should` style that is currently not compatible with IE 9.\n\nConsider [karma-expect](https://github.com/princed/karma-expect), if you need run tests in IE8 and lower.\n\n#### Fair Warning\n\nCurrently, in order to use Chai-as-Promised when running tests within PhantomJS, a polyfill for `Function.prototype.bind` must be supplied.  This plugin includes such a polyfill.  If your code under test is intended to be run under PhantomJS *in production*, bear this in mind!  **You may need to supply your *own* polyfill in your project.**  \n\n*The `Function.prototype.bind` polyfill will be removed in the future v1.0 release of karma-chai-plugins.*\n\nchai-dom and chai-jquery can't work together, choose one of them.\n\nLimited require.js support\n--------------------------\n\n`karma-chai-plugins` supports `requirejs` in tests, but for now it should be stated in frameworks before `chai` and other plugins:\n\n```coffee\nmodule.exports = (config) -\u003e\n  config.set\n\n    # frameworks to use\n    frameworks: ['mocha', 'requirejs', 'chai', 'chai-as-promised']\n\n    # ...\n```\n\nContribution guidelines\n--------------------------\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using `npm test`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinced%2Fkarma-chai-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprinced%2Fkarma-chai-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinced%2Fkarma-chai-plugins/lists"}