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
@types/karma-jasmine
TypeScript definitions for karma-jasmine
@types/karma-jasmine-html-reporter
TypeScript definitions for karma-jasmine-html-reporter
webpack-karma-jasmine
Configuration for karma jasmine
karma-jasmine-spec-tags
A plugin for karma-jasmine. Allows to filter tests (specs) by tags.
A Karma plugin - adapter for Jasmine testing framework.
npm install karma-jasmine
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
542 Stars
289 Commits
162 Forks
32 Watching
17 Branches
60 Contributors
Updated on 14 Sept 2024
Minified
Minified + Gzipped
JavaScript (99.61%)
Shell (0.39%)
Cumulative downloads
Total Downloads
Last day
-0.4%
454,397
Compared to previous day
Last week
3%
2,340,221
Compared to previous week
Last month
6.5%
9,633,550
Compared to previous month
Last year
0.1%
107,732,874
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
24 existing vulnerabilities detected
Details
Score
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