DefinitelyTyped/types/jasmine-node/index.d.ts
Chris Yungmann 6b2775d9b4 [jasmine] make SpyObjMethodNames more strongly-typed
When a generic type argument is provided, require the method names array
to only include keys of the generic type argument and for the object
syntax, additionally require that the setup returned type matches the
return type of the method. Requires TS 2.8 for conditional types.
2018-10-26 12:35:01 -05:00

44 lines
1.2 KiB
TypeScript

// Type definitions for jasmine-node v1.14.5
// Project: https://github.com/mhevery/jasmine-node
// Definitions by: Sven Reglitzki <https://github.com/svi3c>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
///<reference types="jasmine"/>
declare function it(expectation: string, assertion: (done: (err?: any) => void) => void, timeout?: number): void;
declare namespace jasmine {
interface Env {
defaultTimeoutInterval: number;
}
interface ExecuteSpecsOptions {
specFolders: string[],
onComplete?: (runner: jasmine.Runner) => void,
isVerbose?: boolean,
showColors?: boolean,
teamcity?: string | boolean,
useRequireJs?: boolean,
regExpSpec: RegExp,
junitreport?: {
report: boolean,
savePath: string,
useDotNotation: boolean,
consolidate: boolean
},
includeStackTrace?: boolean,
growl?: boolean
}
interface JasmineNode {
executeSpecsInFolder(options: ExecuteSpecsOptions): void;
loadHelpersInFolder(path: string, pattern: RegExp): void;
}
}
declare module "jasmine-node" {
const jasmine: jasmine.JasmineNode;
export = jasmine;
}