Gathering detailed insights and metrics for karma-jasmine
Gathering detailed insights and metrics for karma-jasmine
Gathering detailed insights and metrics for karma-jasmine
Gathering detailed insights and metrics for karma-jasmine
karma-jasmine-html-reporter
A Karma plugin. Dynamically displays tests results at debug.html page
@types/karma-jasmine
TypeScript definitions for karma-jasmine
@types/karma-jasmine-html-reporter
TypeScript definitions for karma-jasmine-html-reporter
mocha
simple, flexible, fun test framework
A Karma plugin - adapter for Jasmine testing framework.
npm install karma-jasmine
Typescript
Module System
Min. Node Version
Node Version
NPM Version
81.2
Supply Chain
94.9
Quality
77.6
Maintenance
100
Vulnerability
98.2
License
JavaScript (99.61%)
Shell (0.39%)
Total Downloads
669,386,157
Last Day
99,916
Last Week
2,289,462
Last Month
10,126,872
Last Year
113,348,251
MIT License
543 Stars
289 Commits
161 Forks
31 Watchers
15 Branches
58 Contributors
Updated on Jun 10, 2025
Minified
Minified + Gzipped
Latest Version
5.1.0
Package Id
karma-jasmine@5.1.0
Unpacked Size
25.93 kB
Size
9.16 kB
File Count
6
NPM Version
8.6.0
Node Version
16.15.1
Cumulative downloads
Total Downloads
Last Day
-8.1%
99,916
Compared to previous day
Last Week
-8.8%
2,289,462
Compared to previous week
Last Month
-0.3%
10,126,872
Compared to previous month
Last Year
7.1%
113,348,251
Compared to previous year
1
1
18
Adapter for the Jasmine testing framework.
1npm install karma-jasmine --save-dev
1// karma.conf.js 2module.exports = function(config) { 3 config.set({ 4 frameworks: ['jasmine'], 5 files: [ 6 '*.js' 7 ] 8 }) 9}
If you want to run only some tests whose name match a given pattern you can do this in the following way
1$ karma start & 2$ karma run -- --grep=<pattern>
where pattern is either a string (e.g --grep=#slow
runs tests containing "#slow") or a Regex (e.g --grep=/^(?!.*#slow).*$/
runs tests not containing "#slow").
You can also pass it to karma.config.js
:
1module.exports = function(config) { 2 config.set({ 3 // ... 4 client: { 5 args: ['--grep', '<pattern>'], 6 // ... 7 } 8 }) 9}
If you want to pass configuration options directly to jasmine you can do this in the following way
1module.exports = function(config) { 2 config.set({ 3 client: { 4 jasmine: { 5 random: true, 6 seed: '4321', 7 oneFailurePerSpec: true, 8 failFast: true, 9 timeoutInterval: 1000 10 } 11 } 12 }) 13}
Failing tests print a debug URL with ?spec=
. Use it with --no_single_run
and paste it into your browser to focus on a single failing test.
By setting config.client.shardIndex
and config.client.totalShards
, you can
run a subset of the full set of specs. Complete sharding support needs to be
done in the process that calls karma, and would need to support test result
integration across shards.
Providing a custom spec filter is also supported.
Example:
1// Users are able to set a custom specFilter themselves 2 3jasmine.getEnv().configure({ 4 specFilter: function (spec) { 5 return spec.getFullName() === 'spec that succeeds' 6 } 7}) 8 9describe('spec', () => { 10 it('that fails', () => { 11 fail('This spec should not run!') 12 }) 13 14 it('that succeeds', () => { 15 expect(1).toBe(1) 16 }) 17})
For more information on Karma see the homepage.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 10/14 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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