mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* jasmine-given: make done arg non-optional * simplify signature * fix readability for authors * clean up parentesis
22 lines
959 B
TypeScript
22 lines
959 B
TypeScript
// Type definitions for jasmine-given 2.6
|
|
// Project: https://github.com/searls/jasmine-given
|
|
// Definitions by: Shai Reznik <https://github.com/shairez>
|
|
// Dmitry Efimenko <https://github.com/DmitryEfimenko>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
|
|
/** Action method that should be called when the async work is complete */
|
|
interface DoneFn {
|
|
(): void;
|
|
|
|
/** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */
|
|
fail: (message?: Error | string) => void;
|
|
}
|
|
|
|
declare function Given(func: (done: DoneFn) => void): void;
|
|
declare function When(func: (done: DoneFn) => void): void;
|
|
declare function Then(func: (done: DoneFn) => void): void;
|
|
declare function Then(label: string, func: (done: DoneFn) => void): void;
|
|
declare function And(func: (done: DoneFn) => void): void;
|
|
declare function Invariant(func: (done: DoneFn) => void): void;
|