1
- declare module 'lab' {
1
+ declare module Lab {
2
2
type ScriptOptions = {
3
3
schedule ?: boolean ;
4
4
cli ?: CommandLineSettings ;
@@ -9,7 +9,7 @@ declare module 'lab' {
9
9
* `globals` split into an array, `id` moved to `ids`, and silence`
10
10
* and `verbose` being flattened into `progress`.
11
11
*/
12
- type CommandLineSettings = {
12
+ interface CommandLineSettings {
13
13
/** An assertion library module path to require and make available under `Lab.assertions` */
14
14
assert ?: string ;
15
15
@@ -110,12 +110,12 @@ declare module 'lab' {
110
110
verbose ?: boolean ;
111
111
}
112
112
113
- export type ReporterType = 'clover' | 'console' | 'html' | 'json' | 'junit' | 'lcov' | 'tap' ;
113
+ type ReporterType = 'clover' | 'console' | 'html' | 'json' | 'junit' | 'lcov' | 'tap' ;
114
114
115
115
/**
116
116
* Progress reporting level
117
117
*/
118
- export const enum ProgressReporting {
118
+ const enum ProgressReporting {
119
119
/** No dots or test names */
120
120
Silence = 0 ,
121
121
@@ -158,14 +158,16 @@ declare module 'lab' {
158
158
*/
159
159
type Hook = TakesCallback | ReturnsPromise ;
160
160
161
- export type Laboratory = {
161
+ type Script = {
162
162
experiment : ( description : string , experiment : Experiment ) => any ;
163
163
test : ( description : string , test : Test ) => any ;
164
164
before : ( fn : Hook ) => void ;
165
165
beforeEach : ( fn : Hook ) => void ;
166
166
after : ( fn : Hook ) => void ;
167
167
afterEach : ( fn : Hook ) => void ;
168
168
}
169
+ }
169
170
170
- export function script ( options ?: Lab . ScriptOptions ) : Laboratory ;
171
+ declare module 'lab' {
172
+ export function script ( options ?: Lab . ScriptOptions ) : Lab . Script ;
171
173
}
0 commit comments