-
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathjasmine.d.ts
More file actions
27 lines (25 loc) · 1.14 KB
/
jasmine.d.ts
File metadata and controls
27 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/// <reference types="./types/expect-webdriverio.d.ts"/>
declare namespace jasmine {
/**
* Async matchers for Jasmine to allow the typing of `expectAsync` with WebDriverIO matchers.
* T is the type of the actual value
* U is the type of the expected value
* Both T,U must stay named as they are to override the default `AsyncMatchers` type from Jasmine.
*
* We force Matchers to return a `Promise<void>` since Jasmine's `expectAsync` expects a promise in all cases (different from Jest)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface AsyncMatchers<T, U> extends Omit<ExpectWebdriverIO.Matchers<Promise<void>, T>, 'toMatchSnapshot' | 'toMatchInlineSnapshot'> {
/**
* snapshot matcher
* @param label optional snapshot label
*/
toMatchSnapshot(label?: string): Promise<void>;
/**
* inline snapshot matcher
* @param snapshot snapshot string (autogenerated if not specified)
* @param label optional snapshot label
*/
toMatchInlineSnapshot(snapshot?: string, label?: string): Promise<void>;
}
}