# gulp-jasmine

> Run Jasmine tests

Latest version **4.0.0** (published 2018-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-jasmine
pnpm add gulp-jasmine
yarn add gulp-jasmine
bun add gulp-jasmine
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2018-04-16 |
| First published | 2014-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/gulp-jasmine) |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 5 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 112 |
| Author | Sindre Sorhus |
| Maintainers | jbblanchet, sindresorhus |
| Keywords | bdd, framework, gulpplugin, jasmine, qunit, runner, spec, tap, tdd, test, testing, unit |

## Links

- npm: https://www.npmjs.com/package/gulp-jasmine
- Repository: https://github.com/sindresorhus/gulp-jasmine
- Homepage: https://github.com/sindresorhus/gulp-jasmine#readme
- Issues: https://github.com/sindresorhus/gulp-jasmine/issues
- npm.io page: https://npm.io/package/gulp-jasmine

## Dependencies (5)

- [arrify](https://npm.io/package/arrify.md) ^1.0.1
- [jasmine](https://npm.io/package/jasmine.md) ^3.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1
- [jasmine-terminal-reporter](https://npm.io/package/jasmine-terminal-reporter.md) ^1.0.3

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2018-04-16
- 3.0.0 — 2017-12-30
- 2.4.2 — 2016-10-03
- 2.4.1 — 2016-09-01
- 2.4.0 — 2016-06-18
- 2.3.0 — 2016-02-18
- 2.2.1 — 2015-11-07
- 2.2.0 — 2015-10-27
- 2.1.0 — 2015-09-17
- 2.0.1 — 2015-03-30
- 2.0.0 — 2015-01-12
- 1.0.1 — 2014-09-14
- 1.0.0 — 2014-08-14
- 0.3.0 — 2014-07-25
- 0.2.0 — 2014-03-03
- … 5 more at https://npm.io/package/gulp-jasmine/versions

## README

# gulp-jasmine [![Build Status](https://travis-ci.org/sindresorhus/gulp-jasmine.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-jasmine)

> Run [Jasmine 2](https://jasmine.github.io/index.html) tests in Node.js

*Issues with the output should be reported on the Jasmine [issue tracker](https://github.com/jasmine/jasmine/issues).*


## Install

```
$ npm install --save-dev gulp-jasmine
```


## Usage

```js
const gulp = require('gulp');
const jasmine = require('gulp-jasmine');

gulp.task('default', () =>
	gulp.src('spec/test.js')
		// gulp-jasmine works on filepaths so you can't have any plugins before it
		.pipe(jasmine())
);
```


## API

### jasmine([options])

#### options

##### verbose

Type: `boolean`<br>
Default: `false`

Display spec names in default reporter.

##### includeStackTrace

Type: `boolean`<br>
Default: `false`

Include stack traces in failures in default reporter.

##### reporter

Type: `Object` `Object[]`

Reporters to use.

```js
const gulp = require('gulp');
const jasmine = require('gulp-jasmine');
const reporters = require('jasmine-reporters');

gulp.task('default', () =>
	gulp.src('spec/test.js')
		.pipe(jasmine({
			reporter: new reporters.JUnitXmlReporter()
		}))
);
```

[Creating your own reporter.](http://jasmine.github.io/2.4/custom_reporter.html)

##### timeout

Type: `number`<br>
Default `5000`

Time to wait in milliseconds before a test automatically fails.

##### errorOnFail

Type: `boolean`<br>
Default: `true`

Stops the stream on failed tests.

##### config

Type: `Object`

Passes the config to Jasmine's [loadConfig](https://jasmine.github.io/2.8/node.html#section-Load_configuration_from_a_file_or_from_an_object.) method.

#### events

##### jasmineDone

Emitted after all tests have been completed. For a discussion about why `jasmineDone` and not `end` nor `finish`, see [pull request #71](https://github.com/sindresorhus/gulp-jasmine/pull/71).

## FAQ

### Babel

Add `require('babel-core/register');` to the top of your `gulpfile.js`. Make sure to read the [Babel docs](https://babeljs.io/docs/usage/require/).


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

---
_Source: https://npm.io/package/gulp-jasmine · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
