mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
* Create definitions for gulp-jasmine@2.4 * Fix the 'reporter' property Functionality: - Make the secondary type of the 'reporter' property in JasmineOptions ReadonlyArray<jasmine.CustomReporter> instead of jasmine.CustomReporter[]. Tests: - Add some more tests Testing done: npm run lint gulp-jasmine (with and without the change to verify the tests fail properly) * Remove unnecessary empty namespace.
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
// Type definitions for gulp-jasmine 2.4
|
|
// Project: https://github.com/sindresorhus/gulp-jasmine#readme
|
|
// Definitions by: Andrey Lalev <https://github.com/andypyrope>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.2
|
|
|
|
/// <reference types="node" />
|
|
/// <reference types="jasmine" />
|
|
|
|
interface JasmineOptions {
|
|
/**
|
|
* Display spec names in default reporter.
|
|
*/
|
|
verbose?: boolean;
|
|
|
|
/**
|
|
* Include stack traces in failures in default reporter.
|
|
* @default false
|
|
*/
|
|
includeStackTrace?: boolean;
|
|
|
|
/**
|
|
* Reporter(s) to use.
|
|
*/
|
|
reporter?: jasmine.CustomReporter | ReadonlyArray<jasmine.CustomReporter>;
|
|
|
|
/**
|
|
* Time to wait in milliseconds before a test automatically fails.
|
|
* @default 5000
|
|
*/
|
|
timeout?: number;
|
|
|
|
/**
|
|
* Stops the stream on failed tests.
|
|
* @default true
|
|
*/
|
|
errorOnFail?: boolean;
|
|
|
|
/**
|
|
* Passes the config to Jasmine's loadConfig method.
|
|
*/
|
|
config?: object;
|
|
}
|
|
|
|
/**
|
|
* Executes Jasmine tests. Emits a 'jasmineDone' event on success.
|
|
* @param options Optional options for the execution of the Jasmine test
|
|
*/
|
|
declare function gulpJasmine(options?: JasmineOptions): NodeJS.ReadWriteStream;
|
|
export = gulpJasmine;
|