kayvee 3.16.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +124 -0
- package/.github/workflows/notify-ci-status.yml +20 -0
- package/.nvmrc +1 -1
- package/.prettierrc.json +1 -0
- package/Makefile +20 -4
- package/build/lib/kayvee.js +13 -17
- package/build/lib/logger/logger.js +84 -76
- package/build/lib/middleware.js +62 -89
- package/build/lib/router/index.js +61 -63
- package/build/package.json +16 -8
- package/build/test/context_logger.js +36 -44
- package/build/test/kayvee.js +16 -16
- package/build/test/logger_test.js +113 -102
- package/build/test/middleware.js +90 -235
- package/build/test/router.js +238 -94
- package/lib/kayvee.ts +19 -7
- package/lib/logger/logger.ts +101 -47
- package/lib/middleware.ts +31 -31
- package/lib/router/index.ts +18 -13
- package/package.json +16 -8
- package/test/context_logger.ts +7 -7
- package/test/kayvee.ts +16 -7
- package/test/logger_test.ts +24 -27
- package/test/middleware.ts +88 -222
- package/test/router.ts +247 -176
- package/tsconfig.json +1 -1
- package/.eslintrc.yml +0 -47
- package/tsd.json +0 -15
- package/tslint.json +0 -134
- package/typings/globals/es6-shim/index.d.ts +0 -666
- package/typings/globals/es6-shim/typings.json +0 -8
- package/typings/index.d.ts +0 -1
- package/typings/mocha/mocha.d.ts +0 -236
- package/typings/node/node.d.ts +0 -2340
- package/typings/tsd.d.ts +0 -2
- package/typings.json +0 -5
package/typings/mocha/mocha.d.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
// Type definitions for mocha 2.2.5
|
|
2
|
-
// Project: http://mochajs.org/
|
|
3
|
-
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>, Vadim Macagon <https://github.com/enlight>
|
|
4
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
|
|
6
|
-
interface MochaSetupOptions {
|
|
7
|
-
//milliseconds to wait before considering a test slow
|
|
8
|
-
slow?: number;
|
|
9
|
-
|
|
10
|
-
// timeout in milliseconds
|
|
11
|
-
timeout?: number;
|
|
12
|
-
|
|
13
|
-
// ui name "bdd", "tdd", "exports" etc
|
|
14
|
-
ui?: string;
|
|
15
|
-
|
|
16
|
-
//array of accepted globals
|
|
17
|
-
globals?: any[];
|
|
18
|
-
|
|
19
|
-
// reporter instance (function or string), defaults to `mocha.reporters.Spec`
|
|
20
|
-
reporter?: any;
|
|
21
|
-
|
|
22
|
-
// bail on the first test failure
|
|
23
|
-
bail?: boolean;
|
|
24
|
-
|
|
25
|
-
// ignore global leaks
|
|
26
|
-
ignoreLeaks?: boolean;
|
|
27
|
-
|
|
28
|
-
// grep string or regexp to filter tests with
|
|
29
|
-
grep?: any;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface MochaDone {
|
|
33
|
-
(error?: Error): void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare var mocha: Mocha;
|
|
37
|
-
declare var describe: Mocha.IContextDefinition;
|
|
38
|
-
declare var xdescribe: Mocha.IContextDefinition;
|
|
39
|
-
// alias for `describe`
|
|
40
|
-
declare var context: Mocha.IContextDefinition;
|
|
41
|
-
// alias for `describe`
|
|
42
|
-
declare var suite: Mocha.IContextDefinition;
|
|
43
|
-
declare var it: Mocha.ITestDefinition;
|
|
44
|
-
declare var xit: Mocha.ITestDefinition;
|
|
45
|
-
// alias for `it`
|
|
46
|
-
declare var test: Mocha.ITestDefinition;
|
|
47
|
-
|
|
48
|
-
declare function before(action: () => void): void;
|
|
49
|
-
|
|
50
|
-
declare function before(action: (done: MochaDone) => void): void;
|
|
51
|
-
|
|
52
|
-
declare function before(description: string, action: () => void): void;
|
|
53
|
-
|
|
54
|
-
declare function before(description: string, action: (done: MochaDone) => void): void;
|
|
55
|
-
|
|
56
|
-
declare function setup(action: () => void): void;
|
|
57
|
-
|
|
58
|
-
declare function setup(action: (done: MochaDone) => void): void;
|
|
59
|
-
|
|
60
|
-
declare function after(action: () => void): void;
|
|
61
|
-
|
|
62
|
-
declare function after(action: (done: MochaDone) => void): void;
|
|
63
|
-
|
|
64
|
-
declare function after(description: string, action: () => void): void;
|
|
65
|
-
|
|
66
|
-
declare function after(description: string, action: (done: MochaDone) => void): void;
|
|
67
|
-
|
|
68
|
-
declare function teardown(action: () => void): void;
|
|
69
|
-
|
|
70
|
-
declare function teardown(action: (done: MochaDone) => void): void;
|
|
71
|
-
|
|
72
|
-
declare function beforeEach(action: () => void): void;
|
|
73
|
-
|
|
74
|
-
declare function beforeEach(action: (done: MochaDone) => void): void;
|
|
75
|
-
|
|
76
|
-
declare function beforeEach(description: string, action: () => void): void;
|
|
77
|
-
|
|
78
|
-
declare function beforeEach(description: string, action: (done: MochaDone) => void): void;
|
|
79
|
-
|
|
80
|
-
declare function suiteSetup(action: () => void): void;
|
|
81
|
-
|
|
82
|
-
declare function suiteSetup(action: (done: MochaDone) => void): void;
|
|
83
|
-
|
|
84
|
-
declare function afterEach(action: () => void): void;
|
|
85
|
-
|
|
86
|
-
declare function afterEach(action: (done: MochaDone) => void): void;
|
|
87
|
-
|
|
88
|
-
declare function afterEach(description: string, action: () => void): void;
|
|
89
|
-
|
|
90
|
-
declare function afterEach(description: string, action: (done: MochaDone) => void): void;
|
|
91
|
-
|
|
92
|
-
declare function suiteTeardown(action: () => void): void;
|
|
93
|
-
|
|
94
|
-
declare function suiteTeardown(action: (done: MochaDone) => void): void;
|
|
95
|
-
|
|
96
|
-
declare class Mocha {
|
|
97
|
-
constructor(options?: {
|
|
98
|
-
grep?: RegExp;
|
|
99
|
-
ui?: string;
|
|
100
|
-
reporter?: string;
|
|
101
|
-
timeout?: number;
|
|
102
|
-
bail?: boolean;
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
/** Setup mocha with the given options. */
|
|
106
|
-
setup(options: MochaSetupOptions): Mocha;
|
|
107
|
-
bail(value?: boolean): Mocha;
|
|
108
|
-
addFile(file: string): Mocha;
|
|
109
|
-
/** Sets reporter by name, defaults to "spec". */
|
|
110
|
-
reporter(name: string): Mocha;
|
|
111
|
-
/** Sets reporter constructor, defaults to mocha.reporters.Spec. */
|
|
112
|
-
reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
|
|
113
|
-
ui(value: string): Mocha;
|
|
114
|
-
grep(value: string): Mocha;
|
|
115
|
-
grep(value: RegExp): Mocha;
|
|
116
|
-
invert(): Mocha;
|
|
117
|
-
ignoreLeaks(value: boolean): Mocha;
|
|
118
|
-
checkLeaks(): Mocha;
|
|
119
|
-
/**
|
|
120
|
-
* Function to allow assertion libraries to throw errors directly into mocha.
|
|
121
|
-
* This is useful when running tests in a browser because window.onerror will
|
|
122
|
-
* only receive the 'message' attribute of the Error.
|
|
123
|
-
*/
|
|
124
|
-
throwError(error: Error): void;
|
|
125
|
-
/** Enables growl support. */
|
|
126
|
-
growl(): Mocha;
|
|
127
|
-
globals(value: string): Mocha;
|
|
128
|
-
globals(values: string[]): Mocha;
|
|
129
|
-
useColors(value: boolean): Mocha;
|
|
130
|
-
useInlineDiffs(value: boolean): Mocha;
|
|
131
|
-
timeout(value: number): Mocha;
|
|
132
|
-
slow(value: number): Mocha;
|
|
133
|
-
enableTimeouts(value: boolean): Mocha;
|
|
134
|
-
asyncOnly(value: boolean): Mocha;
|
|
135
|
-
noHighlighting(value: boolean): Mocha;
|
|
136
|
-
/** Runs tests and invokes `onComplete()` when finished. */
|
|
137
|
-
run(onComplete?: (failures: number) => void): Mocha.IRunner;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// merge the Mocha class declaration with a module
|
|
141
|
-
declare namespace Mocha {
|
|
142
|
-
/** Partial interface for Mocha's `Runnable` class. */
|
|
143
|
-
interface IRunnable {
|
|
144
|
-
title: string;
|
|
145
|
-
fn: Function;
|
|
146
|
-
async: boolean;
|
|
147
|
-
sync: boolean;
|
|
148
|
-
timedOut: boolean;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/** Partial interface for Mocha's `Suite` class. */
|
|
152
|
-
interface ISuite {
|
|
153
|
-
parent: ISuite;
|
|
154
|
-
title: string;
|
|
155
|
-
|
|
156
|
-
fullTitle(): string;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/** Partial interface for Mocha's `Test` class. */
|
|
160
|
-
interface ITest extends IRunnable {
|
|
161
|
-
parent: ISuite;
|
|
162
|
-
pending: boolean;
|
|
163
|
-
|
|
164
|
-
fullTitle(): string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/** Partial interface for Mocha's `Runner` class. */
|
|
168
|
-
interface IRunner {}
|
|
169
|
-
|
|
170
|
-
interface IContextDefinition {
|
|
171
|
-
(description: string, spec: () => void): ISuite;
|
|
172
|
-
only(description: string, spec: () => void): ISuite;
|
|
173
|
-
skip(description: string, spec: () => void): void;
|
|
174
|
-
timeout(ms: number): void;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
interface ITestDefinition {
|
|
178
|
-
(expectation: string, assertion?: () => void): ITest;
|
|
179
|
-
(expectation: string, assertion?: (done: MochaDone) => void): ITest;
|
|
180
|
-
only(expectation: string, assertion?: () => void): ITest;
|
|
181
|
-
only(expectation: string, assertion?: (done: MochaDone) => void): ITest;
|
|
182
|
-
skip(expectation: string, assertion?: () => void): void;
|
|
183
|
-
skip(expectation: string, assertion?: (done: MochaDone) => void): void;
|
|
184
|
-
timeout(ms: number): void;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export module reporters {
|
|
188
|
-
export class Base {
|
|
189
|
-
stats: {
|
|
190
|
-
suites: number;
|
|
191
|
-
tests: number;
|
|
192
|
-
passes: number;
|
|
193
|
-
pending: number;
|
|
194
|
-
failures: number;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
constructor(runner: IRunner);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export class Doc extends Base {}
|
|
201
|
-
export class Dot extends Base {}
|
|
202
|
-
export class HTML extends Base {}
|
|
203
|
-
export class HTMLCov extends Base {}
|
|
204
|
-
export class JSON extends Base {}
|
|
205
|
-
export class JSONCov extends Base {}
|
|
206
|
-
export class JSONStream extends Base {}
|
|
207
|
-
export class Landing extends Base {}
|
|
208
|
-
export class List extends Base {}
|
|
209
|
-
export class Markdown extends Base {}
|
|
210
|
-
export class Min extends Base {}
|
|
211
|
-
export class Nyan extends Base {}
|
|
212
|
-
export class Progress extends Base {
|
|
213
|
-
/**
|
|
214
|
-
* @param options.open String used to indicate the start of the progress bar.
|
|
215
|
-
* @param options.complete String used to indicate a complete test on the progress bar.
|
|
216
|
-
* @param options.incomplete String used to indicate an incomplete test on the progress bar.
|
|
217
|
-
* @param options.close String used to indicate the end of the progress bar.
|
|
218
|
-
*/
|
|
219
|
-
constructor(runner: IRunner, options?: {
|
|
220
|
-
open?: string;
|
|
221
|
-
complete?: string;
|
|
222
|
-
incomplete?: string;
|
|
223
|
-
close?: string;
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
export class Spec extends Base {}
|
|
227
|
-
export class TAP extends Base {}
|
|
228
|
-
export class XUnit extends Base {
|
|
229
|
-
constructor(runner: IRunner, options?: any);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
declare module "mocha" {
|
|
235
|
-
export = Mocha;
|
|
236
|
-
}
|