forked from highcharts/highcharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-utilities.d.ts
53 lines (53 loc) · 1.47 KB
/
test-utilities.d.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
/**
* Useful functions for test purposes.
*/
declare class TestUtilities {
private static readonly timeString;
/**
* A string representation for the current browser. Possible values are
* `Chrome`, `Edge`, `Firefox`, `MSIE`, `Netscape`, `Opera`, `PhantomJS`,
* `Safari`, and an empty string for unknown browsers.
*/
static readonly browser: string;
/**
* Indiciates, if system time runs in CET timezone.
*/
private static readonly isCET;
/**
* Calls a function only, if the system is set to specific timezones.
*
* @param timezones
* Possible values are CET, CEST, etc.
*
* @param fn
* The function to call. First argument is the matching timezone string.
*/
static ifTimezone<T>(timezones: Array<string>, fn: (timezoneString: string) => T): (T | undefined);
/**
* Convenient wrapper for installing lolex and bypassing
* requestAnimationFrame. Returns a clock object.
*
* @param lolexConfig
* Config supplied to lolex.install
*/
private static lolexInstall;
/**
* Convenient wrapper for uninstalling lolex.
*
* @param clock
* The clock object
*/
private static lolexUninstall;
/**
* Convenience wrapper for running timeouts and uninstalling lolex.
*
* @param clock
* The clock object
*/
private static lolexRunAndUninstall;
}