-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathglobal.d.ts
More file actions
74 lines (71 loc) · 2.54 KB
/
global.d.ts
File metadata and controls
74 lines (71 loc) · 2.54 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
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import type { Env } from '@dd/core/types';
interface CustomMatchers<R> {
toBeWithinRange(floor: number, ceiling: number): R;
toRepeatStringTimes(st: string | RegExp, occurences: number | [number, number]): R;
}
interface NonCustomMatchers {
toBeWithinRange(floor: number, ceiling: number): number;
toRepeatStringTimes(st: string | RegExp, occurences: number | [number, number]): string;
}
declare global {
namespace NodeJS {
interface ProcessEnv extends NodeJS.ProcessEnv {
/**
* If '1', we will build the projects using @datadog/rollup-plugin as a plugin.
*/
ADD_BUILD_PLUGINS?: '1';
/**
* Add JSON reports to the build through the output plugin.
*/
BUILD_PLUGINS_REPORTS?: '1';
/**
* The environment in which the plugins will execute.
*
* For instance, we only submit logs to Datadog when the environment is `production`.
*/
BUILD_PLUGINS_ENV?: Env;
/**
* Defined in github actions when running in CI.
*/
CI?: '1';
/**
* Defined in github actions when running in CI.
*
* The commit SHA that triggered the workflow.
*/
GITHUB_SHA?: string;
/**
* Run jest in silent mode.
*/
JEST_SILENT?: '1';
/**
* To also build the plugins before running the tests when using `yarn test:unit`.
*/
NEED_BUILD?: '1';
/**
* To skip the cleanup of the temporary working dirs where we build `runBundlers()`.
*/
NO_CLEANUP?: '1';
/**
* To skip the generation of *.d.ts files in the build.
*/
NO_TYPES?: '1';
/**
* Defined by yarn and targets the root of the project.
*/
PROJECT_CWD?: string;
/**
* The list of bundlers to use in our tests.
*/
REQUESTED_BUNDLERS?: string;
}
}
// Extend Jest's expect with custom matchers defined
// and injected from @dd/tests/src/_jest/setupAfterEnv.ts
namespace jest {
interface Expect extends NonCustomMatchers {}
interface Matchers<R> extends CustomMatchers<R> {}
interface InverseAsymmetricMatchers extends NonCustomMatchers {}
interface AsymmetricMatchers extends NonCustomMatchers {}
}
}