# gulp-mocha

> Run Mocha tests from a gulp task

Source: https://talira.ai/catalog/gulp-mocha-10fqc3sx
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / build / task runners](https://talira.ai/categories/developer-tools/build/task-runners), [developer tools / testing / frameworks](https://talira.ai/categories/developer-tools/testing/frameworks), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [Sindre Sorhus](https://talira.ai/orgs/sindresorhus.md)

gulp-mocha is a gulp plugin that runs Mocha tests from a gulp task: you pipe test file paths into it, and it passes its options straight to the mocha binary, camelCased, with arrays and objects converted to the format Mocha expects. Its README calls it a thin wrapper around Mocha. Install it from npm as gulp-mocha.

## Links

- GitHub: https://github.com/sindresorhus/gulp-mocha

## Problems it solves

- run my Mocha tests as part of a gulp build
- add a test step to an existing gulpfile
- fail a gulp task when Mocha tests fail

## Features

- runs Mocha from a gulp pipeline
- passes any Mocha command-line option, camelCased
- ui, reporter, timeout, bail, grep and require options

## Limitations

- It needs file paths, so no other gulp plugin can come before it in the pipe.[^1]

## Trust

Overall: 0.39 out of 1.
Signals: maintenance 0.46, adoption 0.52, momentum 0.16, community 0.66, backing 0.30, extensibility 0.00.

- last commit 2 months ago
- 1 commits in the last 90 days
- latest release v10.0.1 2.6 years ago
- 377 GitHub stars
- 43 contributors
- accepts sponsorship (Github, Open Collective, Buy Me A Coffee)
- backed by Sindre Sorhus

## Related

- Works with [gulp](https://talira.ai/catalog/gulp-b3h1kxyf.md)
- Works with [Mocha](https://talira.ai/catalog/mocha-81yyxe95.md)

## Alternatives

- [gulp-sourcemaps](https://talira.ai/catalog/gulp-sourcemaps-1mckays5.md): Source map support for gulp builds

## Sources

[^1]: https://github.com/sindresorhus/gulp-mocha/blob/main/readme.md (checked 29 Nov 2026)
[^2]: https://github.com/sindresorhus/gulp-mocha/blob/main/license (checked 29 Nov 2026)
