Gathering detailed insights and metrics for gulp-mocha
Gathering detailed insights and metrics for gulp-mocha
Gathering detailed insights and metrics for gulp-mocha
Gathering detailed insights and metrics for gulp-mocha
npm install gulp-mocha
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70
Supply Chain
22.1
Quality
70.3
Maintenance
100
Vulnerability
98.9
License
JavaScript (100%)
Total Downloads
38,259,089
Last Day
6,734
Last Week
41,501
Last Month
207,819
Last Year
2,861,769
MIT License
376 Stars
168 Commits
85 Forks
12 Watchers
1 Branches
41 Contributors
Updated on Apr 13, 2025
Latest Version
10.0.1
Package Id
gulp-mocha@10.0.1
Unpacked Size
6.81 kB
Size
3.32 kB
File Count
4
NPM Version
10.5.2
Node Version
20.12.2
Published on
Apr 19, 2024
Cumulative downloads
Total Downloads
Last Day
47%
6,734
Compared to previous day
Last Week
0.6%
41,501
Compared to previous week
Last Month
-4.2%
207,819
Compared to previous month
Last Year
10.3%
2,861,769
Compared to previous year
Run Mocha tests
Keep in mind that this is just a thin wrapper around Mocha and your issue is most likely with Mocha.
1npm install --save-dev gulp-mocha
1import gulp from 'gulp'; 2import mocha from 'gulp-mocha'; 3 4export default () => ( 5 gulp.src('test.js', {read: false}) 6 // `gulp-mocha` needs file paths so you cannot have any plugins before it. 7 .pipe(mocha({reporter: 'nyan'})) 8);
Type: object
Options are passed directly to the mocha
binary, so you can use any its command-line options in a camelCased form. Arrays and key/value objects are correctly converted to the comma separated list format Mocha expects. Listed below are some of the more commonly used options:
Type: string
Default: 'bdd'
Values: 'bdd' | 'tdd' | 'qunit' | 'exports'
The interface to use.
Type: string
Default: spec
Values: Reporters
The reporter that will be used.
This option can also be used to utilize third-party reporters. For example, if you npm install mocha-lcov-reporter
you can then do use mocha-lcov-reporter
as value.
Type: object
Example: {reportFilename: 'index.html'}
Reporter specific options.
Type: string[]
List of accepted global variable names, example ['YUI']
. Accepts wildcards to match multiple global variables, e.g. ['gulp*']
or even ['*']
. See Mocha globals option.
Type: number
Default: 2000
Test-case timeout in milliseconds.
Type: boolean
Default: false
Bail on the first test failure.
Type: boolean
Default: false
Check for global variable leaks.
Type: string
Only run tests matching the given pattern which is internally compiled to a RegExp.
Type: string[]
Require custom modules before tests are run.
Type: string
Example: js:babel-core/register
Specify a compiler.
If your test suite is not exiting it might be because you still have a lingering callback, most often caused by an open database connection. You should close this connection or do the following:
1export default () => ( 2 gulp.src('test.js') 3 .pipe(mocha()) 4 .once('error', err => { 5 console.error(err); 6 process.exit(1); 7 }) 8 .once('end', () => { 9 process.exit(); 10 }) 11);
Or you might just need to pass the exit
option:
1export const test = () => ( 2 gulp.src(['test/**/*.js'], {read: false}) 3 .pipe(mocha({reporter: 'list', exit: true})) 4 .on('error', console.error) 5);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 8/30 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
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
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