UNPKG

26.3 kBTypeScriptView Raw
1type ImplementationCallback = (() => Promise<any>) | ((done: DoneFn) => void);
2
3/**
4 * Create a group of specs (often called a suite).
5 * @param description Textual description of the group
6 * @param specDefinitions Function for Jasmine to invoke that will define inner suites a specs
7 */
8declare function describe(description: string, specDefinitions: () => void): void;
9declare function fdescribe(description: string, specDefinitions: () => void): void;
10declare function xdescribe(description: string, specDefinitions: () => void): void;
11
12/**
13 * Define a single spec. A spec should contain one or more expectations that test the state of the code.
14 * A spec whose expectations all succeed will be passing and a spec with any failures will fail.
15 * @param expectation Textual description of what this spec is checking
16 * @param assertion Function that contains the code of your test. If not provided the test will be pending.
17 * @param timeout Custom timeout for an async spec.
18 */
19declare function it(expectation: string, assertion?: ImplementationCallback, timeout?: number): void;
20
21/**
22 * A focused it
23 * If suites or specs are focused, only those that are focused will be executed.
24 * @param expectation
25 * @param assertion
26 * @param timeout
27 */
28declare function fit(expectation: string, assertion?: ImplementationCallback, timeout?: number): void;
29declare function xit(expectation: string, assertion?: ImplementationCallback, timeout?: number): void;
30
31/**
32 * Mark a spec as pending, expectation results will be ignored.
33 * If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending.
34 * @param reason
35 * @returns {}
36 */
37declare function pending(reason?: string): void;
38
39/**
40 * Run some shared setup before each of the specs in the describe in which it is called.
41 * @param action Function that contains the code to setup your specs.
42 * @param timeout Custom timeout for an async beforeEach.
43 */
44declare function beforeEach(action: ImplementationCallback, timeout?: number): void;
45
46/**
47 * Run some shared teardown after each of the specs in the describe in which it is called.
48 * @param action Function that contains the code to teardown your specs.
49 * @param timeout Custom timeout for an async afterEach.
50 */
51declare function afterEach(action: ImplementationCallback, timeout?: number): void;
52
53/**
54 * Run some shared setup once before all of the specs in the describe are run.
55 * Note: Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
56 * @param action Function that contains the code to setup your specs.
57 * @param timeout Custom timeout for an async beforeAll.
58 */
59declare function beforeAll(action: ImplementationCallback, timeout?: number): void;
60
61/**
62 * Run some shared teardown once after all of the specs in the describe are called.
63 * Note: Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
64 * @param action Function that contains the code to teardown your specs.
65 * @param timeout Custom timeout for an async afterAll
66 */
67declare function afterAll(action: ImplementationCallback, timeout?: number): void;
68
69/**
70 * Create an expectation for a spec.
71 * @param spy
72 */
73declare function expect(spy: Function): jasmine.Matchers<any>;
74
75/**
76 * Create an expectation for a spec.
77 * @param actual
78 */
79declare function expect<T>(actual: ArrayLike<T>): jasmine.ArrayLikeMatchers<T>;
80
81/**
82 * Create an expectation for a spec.
83 * @param actual Actual computed value to test expectations against.
84 */
85declare function expect<T>(actual: T): jasmine.Matchers<T>;
86
87/**
88 * Create an expectation for a spec.
89 */
90declare function expect(): jasmine.NothingMatcher;
91
92/**
93 * Explicitly mark a spec as failed.
94 * @param e
95 */
96declare function fail(e?: any): void;
97
98/** Action method that should be called when the async work is complete */
99interface DoneFn extends Function {
100 (): void;
101
102 /** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */
103 fail: (message?: Error | string) => void;
104}
105
106/**
107 * Install a spy onto an existing object.
108 * @param object The object upon which to install the Spy
109 * @param method The name of the method to replace with a Spy.
110 */
111declare function spyOn<T>(object: T, method: keyof T): jasmine.Spy;
112
113/**
114 * Install a spy on a property onto an existing object.
115 * @param object The object upon which to install the Spy
116 * @param property The name of the property to replace with a Spy
117 * @param accessType The access type (get|set) of the property to Spy on.
118 */
119declare function spyOnProperty<T>(object: T, property: keyof T, accessType?: "get" | "set"): jasmine.Spy;
120
121declare function runs(asyncMethod: Function): void;
122declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
123declare function waits(timeout?: number): void;
124
125declare namespace jasmine {
126 type Expected<T> = T | ObjectContaining<T> | Any | Spy;
127 type SpyObjMethodNames<T = undefined> = T extends undefined
128 ? (ReadonlyArray<string> | { [methodName: string]: any })
129 : (ReadonlyArray<keyof T> | { [P in keyof T]?: ReturnType<T[P] extends (...args: any[]) => any ? T[P] : any> });
130
131 var clock: () => Clock;
132
133 var matchersUtil: MatchersUtil;
134
135 function any(aclass: any): Any;
136
137 function anything(): Any;
138
139 function arrayContaining<T>(sample: ArrayLike<T>): ArrayContaining<T>;
140 function arrayWithExactContents<T>(sample: ArrayLike<T>): ArrayContaining<T>;
141 function objectContaining<T>(sample: Partial<T>): ObjectContaining<T>;
142 function createSpy(name?: string, originalFn?: Function): Spy;
143
144 function createSpyObj(baseName: string, methodNames: SpyObjMethodNames): any;
145 function createSpyObj<T>(baseName: string, methodNames: SpyObjMethodNames<T>): SpyObj<T>;
146
147 function createSpyObj(methodNames: SpyObjMethodNames): any;
148 function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;
149
150 function pp(value: any): string;
151
152 function getEnv(): Env;
153
154 function addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
155
156 function addMatchers(matchers: CustomMatcherFactories): void;
157
158 function stringMatching(str: string): Any;
159 function stringMatching(str: RegExp): Any;
160
161 function formatErrorMsg(domain: string, usage: string): (msg: string) => string;
162
163 interface Any {
164 (...params: any[]): any; // jasmine.Any can also be a function
165 new(expectedClass: any): any;
166
167 jasmineMatches(other: any): boolean;
168 jasmineToString(): string;
169 }
170
171 // taken from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains()
172 interface ArrayLike<T> {
173 length: number;
174 [n: number]: T;
175 }
176
177 interface ArrayContaining<T> {
178 new(sample: ArrayLike<T>): ArrayLike<T>;
179
180 asymmetricMatch(other: any): boolean;
181 jasmineToString(): string;
182 }
183
184 interface ObjectContaining<T> {
185 new(sample: Partial<T>): Partial<T>;
186
187 jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean;
188 jasmineToString(): string;
189 }
190
191 interface Block {
192 new(env: Env, func: SpecFunction, spec: Spec): any;
193
194 execute(onComplete: () => void): void;
195 }
196
197 interface WaitsBlock extends Block {
198 new(env: Env, timeout: number, spec: Spec): any;
199 }
200
201 interface WaitsForBlock extends Block {
202 new(env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any;
203 }
204
205 interface Clock {
206 install(): void;
207 uninstall(): void;
208 /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */
209 tick(ms: number): void;
210 mockDate(date?: Date): void;
211 withMock(func: () => void): void;
212 }
213
214 type CustomEqualityTester = (first: any, second: any) => boolean | void;
215
216 interface CustomMatcher {
217 compare<T>(actual: T, expected: T, ...args: any[]): CustomMatcherResult;
218 compare(actual: any, ...expected: any[]): CustomMatcherResult;
219 negativeCompare?<T>(actual: T, expected: T, ...args: any[]): CustomMatcherResult;
220 negativeCompare?(actual: any, ...expected: any[]): CustomMatcherResult;
221 }
222
223 type CustomMatcherFactory = (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]) => CustomMatcher;
224
225 interface CustomMatcherFactories {
226 [index: string]: CustomMatcherFactory;
227 }
228
229 interface CustomMatcherResult {
230 pass: boolean;
231 message?: string | undefined;
232 }
233
234 interface MatchersUtil {
235 equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean;
236 contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: CustomEqualityTester[]): boolean;
237 buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string;
238 }
239
240 interface Env {
241 setTimeout: any;
242 clearTimeout: void;
243 setInterval: any;
244 clearInterval: void;
245 updateInterval: number;
246
247 currentSpec: Spec;
248
249 matchersClass: Matchers<any>;
250
251 version(): any;
252 versionString(): string;
253 nextSpecId(): number;
254 addReporter(reporter: Reporter): void;
255 addReporter(reporter: CustomReporter): void;
256 execute(): void;
257 describe(description: string, specDefinitions: () => void): Suite;
258 // ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these
259 beforeEach(beforeEachFunction: ImplementationCallback, timeout?: number): void;
260 beforeAll(beforeAllFunction: ImplementationCallback, timeout?: number): void;
261 currentRunner(): Runner;
262 afterEach(afterEachFunction: ImplementationCallback, timeout?: number): void;
263 afterAll(afterAllFunction: ImplementationCallback, timeout?: number): void;
264 xdescribe(desc: string, specDefinitions: () => void): XSuite;
265 it(description: string, func: () => void): Spec;
266 // iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these
267 xit(desc: string, func: () => void): XSpec;
268 compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean;
269 compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
270 equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
271 contains_(haystack: any, needle: any): boolean;
272 addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
273 addMatchers(matchers: CustomMatcherFactories): void;
274 specFilter(spec: Spec): boolean;
275 throwOnExpectationFailure(value: boolean): void;
276 seed(seed: string | number): string | number;
277 provideFallbackReporter(reporter: Reporter): void;
278 throwingExpectationFailures(): boolean;
279 allowRespy(allow: boolean): void;
280 randomTests(): boolean;
281 randomizeTests(b: boolean): void;
282 clearReporters(): void;
283 }
284
285 interface FakeTimer {
286 new(): any;
287
288 reset(): void;
289 tick(millis: number): void;
290 runFunctionsWithinRange(oldMillis: number, nowMillis: number): void;
291 scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void;
292 }
293
294 interface HtmlReporter {
295 new(): any;
296 }
297
298 interface HtmlSpecFilter {
299 new(): any;
300 }
301
302 interface Result {
303 type: string;
304 }
305
306 interface NestedResults extends Result {
307 description: string;
308
309 totalCount: number;
310 passedCount: number;
311 failedCount: number;
312
313 skipped: boolean;
314
315 rollupCounts(result: NestedResults): void;
316 log(values: any): void;
317 getItems(): Result[];
318 addResult(result: Result): void;
319 passed(): boolean;
320 }
321
322 interface MessageResult extends Result {
323 values: any;
324 trace: Trace;
325 }
326
327 interface ExpectationResult extends Result {
328 matcherName: string;
329 passed(): boolean;
330 expected: any;
331 actual: any;
332 message: string;
333 trace: Trace;
334 }
335
336 interface Order {
337 new(options: { random: boolean; seed: string }): any;
338 random: boolean;
339 seed: string;
340 sort<T>(items: T[]): T[];
341 }
342
343 namespace errors {
344 class ExpectationFailed extends Error {
345 constructor();
346
347 stack: any;
348 }
349 }
350
351 interface TreeProcessor {
352 new(attrs: any): any;
353 execute: (done: Function) => void;
354 processTree(): any;
355 }
356
357 interface Trace {
358 name: string;
359 message: string;
360 stack: any;
361 }
362
363 interface PrettyPrinter {
364 new(): any;
365
366 format(value: any): void;
367 iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void;
368 emitScalar(value: any): void;
369 emitString(value: string): void;
370 emitArray(array: any[]): void;
371 emitObject(obj: any): void;
372 append(value: any): void;
373 }
374
375 interface StringPrettyPrinter extends PrettyPrinter {
376 }
377
378 interface Queue {
379 new(env: any): any;
380
381 env: Env;
382 ensured: boolean[];
383 blocks: Block[];
384 running: boolean;
385 index: number;
386 offset: number;
387 abort: boolean;
388
389 addBefore(block: Block, ensure?: boolean): void;
390 add(block: any, ensure?: boolean): void;
391 insertNext(block: any, ensure?: boolean): void;
392 start(onComplete?: () => void): void;
393 isRunning(): boolean;
394 next_(): void;
395 results(): NestedResults;
396 }
397
398 interface Matchers<T> {
399 new(env: Env, actual: T, spec: Env, isNot?: boolean): any;
400
401 env: Env;
402 actual: T;
403 spec: Env;
404 isNot?: boolean | undefined;
405 message(): any;
406
407 /**
408 * @param expected the actual value to be === to the expected value.
409 * @param expectationFailOutput
410 * @returns {}
411 */
412 toBe(expected: Expected<T>, expectationFailOutput?: any): boolean;
413
414 /**
415 * @param expected the actual value to be equal to the expected, using deep equality comparison.
416 * @param expectationFailOutput
417 * @returns {}
418 */
419 toEqual(expected: Expected<T>, expectationFailOutput?: any): boolean;
420 toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean;
421 toBeDefined(expectationFailOutput?: any): boolean;
422 toBeUndefined(expectationFailOutput?: any): boolean;
423 toBeNull(expectationFailOutput?: any): boolean;
424 toBeNaN(): boolean;
425 toBeTruthy(expectationFailOutput?: any): boolean;
426 toBeFalsy(expectationFailOutput?: any): boolean;
427 toHaveBeenCalled(): boolean;
428 toHaveBeenCalledBefore(expected: Spy): boolean;
429 toHaveBeenCalledWith(...params: any[]): boolean;
430 toHaveBeenCalledTimes(expected: number): boolean;
431 toContain(expected: any, expectationFailOutput?: any): boolean;
432 toBeLessThan(expected: number, expectationFailOutput?: any): boolean;
433 toBeLessThanOrEqual(expected: number, expectationFailOutput?: any): boolean;
434 toBeGreaterThan(expected: number, expectationFailOutput?: any): boolean;
435 toBeGreaterThanOrEqual(expected: number, expectationFailOutput?: any): boolean;
436 toBeCloseTo(expected: number, precision?: any, expectationFailOutput?: any): boolean;
437 toThrow(expected?: any): boolean;
438 toThrowError(message?: string | RegExp): boolean;
439 toThrowError(expected?: new(...args: any[]) => Error, message?: string | RegExp): boolean;
440
441 not: Matchers<T>;
442
443 Any: Any;
444 }
445
446 interface ArrayLikeMatchers<T> extends Matchers<ArrayLike<T>> {
447 toBe(expected: Expected<ArrayLike<T>> | ArrayContaining<T>, expectationFailOutput?: any): boolean;
448 toEqual(expected: Expected<ArrayLike<T>> | ArrayContaining<T>, expectationFailOutput?: any): boolean;
449 toContain(expected: Expected<T>, expectationFailOutput?: any): boolean;
450 not: ArrayLikeMatchers<T>;
451 }
452
453 interface NothingMatcher {
454 nothing(): void;
455 }
456
457 interface Reporter {
458 reportRunnerStarting(runner: Runner): void;
459 reportRunnerResults(runner: Runner): void;
460 reportSuiteResults(suite: Suite): void;
461 reportSpecStarting(spec: Spec): void;
462 reportSpecResults(spec: Spec): void;
463 log(str: string): void;
464 }
465
466 interface MultiReporter extends Reporter {
467 addReporter(reporter: Reporter): void;
468 }
469
470 interface SuiteInfo {
471 totalSpecsDefined: number;
472 }
473
474 interface CustomReportExpectation {
475 matcherName: string;
476 message: string;
477 passed: boolean;
478 stack: string;
479 }
480
481 interface FailedExpectation extends CustomReportExpectation {
482 actual: string;
483 expected: string;
484 }
485
486 interface PassedExpectation extends CustomReportExpectation {
487 }
488
489 interface CustomReporterResult {
490 description: string;
491 failedExpectations?: FailedExpectation[] | undefined;
492 fullName: string;
493 id: string;
494 passedExpectations?: PassedExpectation[] | undefined;
495 pendingReason?: string | undefined;
496 status?: string | undefined;
497 }
498
499 interface RunDetails {
500 failedExpectations: ExpectationResult[];
501 order: jasmine.Order;
502 }
503
504 interface CustomReporter {
505 jasmineStarted?(suiteInfo: SuiteInfo): void;
506 suiteStarted?(result: CustomReporterResult): void;
507 specStarted?(result: CustomReporterResult): void;
508 specDone?(result: CustomReporterResult): void;
509 suiteDone?(result: CustomReporterResult): void;
510 jasmineDone?(runDetails: RunDetails): void;
511 }
512
513 interface Runner {
514 new(env: Env): any;
515
516 execute(): void;
517 beforeEach(beforeEachFunction: SpecFunction): void;
518 afterEach(afterEachFunction: SpecFunction): void;
519 beforeAll(beforeAllFunction: SpecFunction): void;
520 afterAll(afterAllFunction: SpecFunction): void;
521 finishCallback(): void;
522 addSuite(suite: Suite): void;
523 add(block: Block): void;
524 specs(): Spec[];
525 suites(): Suite[];
526 topLevelSuites(): Suite[];
527 results(): NestedResults;
528 }
529
530 type SpecFunction = (spec?: Spec) => void;
531
532 interface SuiteOrSpec {
533 id: number;
534 env: Env;
535 description: string;
536 queue: Queue;
537 }
538
539 interface Spec extends SuiteOrSpec {
540 new(env: Env, suite: Suite, description: string): any;
541
542 suite: Suite;
543
544 afterCallbacks: SpecFunction[];
545 spies_: Spy[];
546
547 results_: NestedResults;
548 matchersClass: Matchers<any>;
549
550 getFullName(): string;
551 results(): NestedResults;
552 log(arguments: any): any;
553 runs(func: SpecFunction): Spec;
554 addToQueue(block: Block): void;
555 addMatcherResult(result: Result): void;
556 getResult(): any;
557 expect(actual: any): any;
558 waits(timeout: number): Spec;
559 waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec;
560 fail(e?: any): void;
561 getMatchersClass_(): Matchers<any>;
562 addMatchers(matchersPrototype: CustomMatcherFactories): void;
563 finishCallback(): void;
564 finish(onComplete?: () => void): void;
565 after(doAfter: SpecFunction): void;
566 execute(onComplete?: () => void, enabled?: boolean): any;
567 addBeforesAndAftersToQueue(): void;
568 explodes(): void;
569 spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy;
570 spyOnProperty(object: any, property: string, accessType?: "get" | "set"): Spy;
571 removeAllSpies(): void;
572 throwOnExpectationFailure: boolean;
573 }
574
575 interface XSpec {
576 id: number;
577 runs(): void;
578 }
579
580 interface Suite extends SuiteOrSpec {
581 new(env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any;
582
583 parentSuite: Suite;
584
585 getFullName(): string;
586 finish(onComplete?: () => void): void;
587 beforeEach(beforeEachFunction: SpecFunction): void;
588 afterEach(afterEachFunction: SpecFunction): void;
589 beforeAll(beforeAllFunction: SpecFunction): void;
590 afterAll(afterAllFunction: SpecFunction): void;
591 results(): NestedResults;
592 add(suiteOrSpec: SuiteOrSpec): void;
593 specs(): Spec[];
594 suites(): Suite[];
595 children(): any[];
596 execute(onComplete?: () => void): void;
597 }
598
599 interface XSuite {
600 execute(): void;
601 }
602
603 interface Spy {
604 (...params: any[]): any;
605
606 and: SpyAnd;
607 calls: Calls;
608 }
609
610 type SpyObj<T> =
611 & T
612 & {
613 [k in keyof T]: T[k] extends Function ? T[k] & Spy : T[k];
614 };
615
616 interface SpyAnd {
617 identity: string;
618
619 /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */
620 callThrough(): Spy;
621 /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */
622 returnValue(val: any): Spy;
623 /** By chaining the spy with and.returnValues, all calls to the function will return specific values in order until it reaches the end of the return values list. */
624 returnValues(...values: any[]): Spy;
625 /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */
626 callFake(fn: Function): Spy;
627 /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */
628 throwError(msg: string): Spy;
629 /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */
630 stub(): Spy;
631 }
632
633 interface Calls {
634 /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/
635 any(): boolean;
636 /** By chaining the spy with calls.count(), will return the number of times the spy was called **/
637 count(): number;
638 /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/
639 argsFor(index: number): any[];
640 /** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
641 allArgs(): any[];
642 /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
643 all(): CallInfo[];
644 /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
645 mostRecent(): CallInfo;
646 /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
647 first(): CallInfo;
648 /** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
649 reset(): void;
650 /** Set this spy to do a shallow clone of arguments passed to each invocation. */
651 saveArgumentsByValue(): void;
652 }
653
654 interface CallInfo {
655 /** The context (the this) for the call */
656 object: any;
657 /** All arguments passed to the call */
658 args: any[];
659 /** The return value of the call */
660 returnValue: any;
661 }
662
663 interface Util {
664 inherit(childClass: Function, parentClass: Function): any;
665 formatException(e: any): any;
666 htmlEscape(str: string): string;
667 argsToArray(args: any): any;
668 extend(destination: any, source: any): any;
669 }
670
671 interface JsApiReporter extends Reporter {
672 started: boolean;
673 finished: boolean;
674 result: any;
675 messages: any;
676 runDetails: RunDetails;
677
678 new(): any;
679
680 suites(): Suite[];
681 summarize_(suiteOrSpec: SuiteOrSpec): any;
682 results(): any;
683 resultsForSpec(specId: any): any;
684 log(str: any): any;
685 resultsForSpecs(specIds: any): any;
686 summarizeResult_(result: any): any;
687 }
688
689 interface Jasmine {
690 Spec: Spec;
691 clock: Clock;
692 util: Util;
693 }
694
695 export var HtmlReporter: HtmlReporter;
696 export var HtmlSpecFilter: HtmlSpecFilter;
697 export var DEFAULT_TIMEOUT_INTERVAL: number;
698 export var MAX_PRETTY_PRINT_DEPTH: number;
699}
700
701declare module "jasmine" {
702 class jasmine {
703 constructor(options: any);
704 jasmine: jasmine.Jasmine;
705 addMatchers(matchers: jasmine.CustomMatcherFactories): void;
706 addReporter(reporter: jasmine.Reporter): void;
707 addSpecFile(filePath: string): void;
708 addSpecFiles(files: string[]): void;
709 configureDefaultReporter(options: any, ...args: any[]): void;
710 execute(files?: string[], filterString?: string): any;
711 exitCodeCompletion(passed: any): void;
712 loadConfig(config: any): void;
713 loadConfigFile(configFilePath: any): void;
714 loadHelpers(): void;
715 loadSpecs(): void;
716 onComplete(onCompleteCallback: (passed: boolean) => void): void;
717 provideFallbackReporter(reporter: jasmine.Reporter): void;
718 randomizeTests(value?: any): boolean;
719 seed(value: any): void;
720 showColors(value: any): void;
721 stopSpecOnExpectationFailure(value: any): void;
722 static ConsoleReporter(): any;
723 env: jasmine.Env;
724 reportersCount: number;
725 completionReporter: jasmine.CustomReporter;
726 reporter: jasmine.CustomReporter;
727 coreVersion(): string;
728 showingColors: boolean;
729 projectBaseDir: string;
730 printDeprecation(): void;
731 specFiles: string[];
732 helperFiles: string[];
733 }
734 export = jasmine;
735}