Installations
npm install karma-chai-plugins
Releases
Unable to fetch releases
Developer
princed
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
6.9.1
NPM Version
3.10.8
Statistics
30 Stars
169 Commits
20 Forks
1 Watching
104 Branches
11 Contributors
Updated on 29 Jan 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
3,625,980
Last day
-15%
271
Compared to previous day
Last week
-13.9%
1,465
Compared to previous week
Last month
-18.7%
7,155
Compared to previous month
Last year
-39.5%
112,943
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
karma-chai-plugins
Installation
Install the karma-chai-plugins
:
1$ npm install karma-chai-plugins --save-dev
Add chai
and plugins you need to the frameworks
key in your Karma configuration:
1module.exports = (config) -> 2 config.set 3 4 # frameworks to use 5 frameworks: ['mocha', 'chai', 'chai-as-promised'] 6 7 # ...
Bundled plugins
- chai
- chai-as-promised
- chai-dom (do not use with chai-jquery)
- chai-jquery (jQuery should be included manually)
- sinon-chai (sinon will be included automatically)
- chai-things
Note: for using sinon, it is sufficient to add sinon-chai
in karma frameworks. No need to add sinon
.
Browser support
Same as Chai.js: IE 9+, Chrome 7+, FireFox 4+, Safari 5+ except should
style that is currently not compatible with IE 9.
Consider karma-expect, if you need run tests in IE8 and lower.
Fair Warning
Currently, 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.
The Function.prototype.bind
polyfill will be removed in the future v1.0 release of karma-chai-plugins.
chai-dom and chai-jquery can't work together, choose one of them.
Limited require.js support
karma-chai-plugins
supports requirejs
in tests, but for now it should be stated in frameworks before chai
and other plugins:
1module.exports = (config) -> 2 config.set 3 4 # frameworks to use 5 frameworks: ['mocha', 'requirejs', 'chai', 'chai-as-promised'] 6 7 # ...
Contribution guidelines
In 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
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 7/24 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 13 are checked with a SAST tool
Score
3.3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More