gulp-jasmine

Run Jasmine tests

MIT 20 个版本
安装
npm install gulp-jasmine
yarn add gulp-jasmine
pnpm add gulp-jasmine
bun add gulp-jasmine
README

gulp-jasmine Build Status

Run Jasmine 2 tests in Node.js

Issues with the output should be reported on the Jasmine issue tracker.

Install

$ npm install --save-dev gulp-jasmine

Usage

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
Default: false

Display spec names in default reporter.

includeStackTrace

Type: boolean
Default: false

Include stack traces in failures in default reporter.

reporter

Type: Object Object[]

Reporters to use.

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.

timeout

Type: number
Default 5000

Time to wait in milliseconds before a test automatically fails.

errorOnFail

Type: boolean
Default: true

Stops the stream on failed tests.

config

Type: Object

Passes the config to Jasmine's loadConfig 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.

FAQ

Babel

Add require('babel-core/register'); to the top of your gulpfile.js. Make sure to read the Babel docs.

License

MIT © Sindre Sorhus

版本列表
4.0.0 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
0.1.4 2014-02-15
0.1.3 2014-02-04
0.1.2 2014-01-17
0.1.1 2014-01-03
0.1.0 2014-01-03