@japa/runner 4.4.0 → 4.4.1
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/README.md +61 -0
- package/build/create_test-CuTGNCAf.js +353 -0
- package/build/factories/create_dummy_tests.d.ts +1 -1
- package/build/factories/main.d.ts +1 -1
- package/build/factories/main.js +182 -232
- package/build/factories/runner.d.ts +1 -1
- package/build/helpers-BlHaYYTh.js +241 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +214 -278
- package/build/main-CB1nhl6c.js +336 -0
- package/build/modules/core/main.js +2 -21
- package/build/modules/core/reporters/base.d.ts +1 -1
- package/build/src/create_test.d.ts +1 -1
- package/build/src/debug.d.ts +1 -1
- package/build/src/helpers.d.ts +2 -2
- package/build/src/hooks.d.ts +1 -1
- package/build/src/plugins/main.js +20 -28
- package/build/src/reporters/main.js +3 -14
- package/build/src/reporters/spec.d.ts +1 -1
- package/build/src/types.js +7 -14
- package/build/src/validator.d.ts +1 -1
- package/package.json +30 -32
- package/build/chunk-2KG3PWR4.js +0 -17
- package/build/chunk-L7YZLDZD.js +0 -340
- package/build/chunk-RFKFNXTE.js +0 -347
- package/build/chunk-TLYU3GFT.js +0 -519
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { d as BaseReporter, n as icons, t as colors } from "./helpers-BlHaYYTh.js";
|
|
2
|
+
import { ErrorsPrinter } from "@japa/errors-printer";
|
|
3
|
+
import { stripVTControlCharacters } from "node:util";
|
|
4
|
+
import { relative } from "node:path";
|
|
5
|
+
import string from "@poppinss/string";
|
|
6
|
+
var DotReporter = class extends BaseReporter {
|
|
7
|
+
onTestEnd(payload) {
|
|
8
|
+
let output = "";
|
|
9
|
+
if (payload.isTodo) output = colors.cyan(icons.info);
|
|
10
|
+
else if (payload.hasError) output = colors.red(icons.cross);
|
|
11
|
+
else if (payload.isSkipped) output = colors.yellow(icons.bullet);
|
|
12
|
+
else if (payload.isFailing) output = colors.magenta(icons.squareSmallFilled);
|
|
13
|
+
else output = colors.green(icons.tick);
|
|
14
|
+
process.stdout.write(`${output}`);
|
|
15
|
+
}
|
|
16
|
+
async end() {
|
|
17
|
+
console.log("");
|
|
18
|
+
await this.printSummary(this.runner.getSummary());
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var SpecReporter = class extends BaseReporter {
|
|
22
|
+
#isFirstLoneTest = true;
|
|
23
|
+
#getTestIcon(payload) {
|
|
24
|
+
if (payload.isTodo) return colors.cyan(icons.info);
|
|
25
|
+
if (payload.hasError) return colors.red(icons.cross);
|
|
26
|
+
if (payload.isSkipped) return colors.yellow(icons.bullet);
|
|
27
|
+
if (payload.isFailing) return colors.magenta(icons.squareSmallFilled);
|
|
28
|
+
return colors.green(icons.tick);
|
|
29
|
+
}
|
|
30
|
+
#getTestMessage(payload) {
|
|
31
|
+
const message = payload.title.expanded;
|
|
32
|
+
if (payload.isTodo) return colors.blue(message);
|
|
33
|
+
if (payload.hasError) return colors.red(message);
|
|
34
|
+
if (payload.isSkipped) return colors.yellow(message);
|
|
35
|
+
if (payload.isFailing) return colors.magenta(message);
|
|
36
|
+
return colors.grey(message);
|
|
37
|
+
}
|
|
38
|
+
#getSubText(payload) {
|
|
39
|
+
if (payload.isSkipped && payload.skipReason) return colors.dim(`${icons.branch} ${colors.italic(payload.skipReason)}`);
|
|
40
|
+
if (!payload.isFailing) return;
|
|
41
|
+
if (payload.hasError) {
|
|
42
|
+
const message = payload.errors.find((error) => error.phase === "test")?.error.message ?? `Test marked with ".fails()" must finish with an error`;
|
|
43
|
+
return colors.dim(`${icons.branch} ${colors.italic(message)}`);
|
|
44
|
+
}
|
|
45
|
+
if (payload.failReason) return colors.dim(`${icons.branch} ${colors.italic(payload.failReason)}`);
|
|
46
|
+
const testErrorMessage = payload.errors.find((error) => error.phase === "test");
|
|
47
|
+
if (testErrorMessage && testErrorMessage.error) return colors.dim(`${icons.branch} ${colors.italic(testErrorMessage.error.message)}`);
|
|
48
|
+
}
|
|
49
|
+
#getRelativeFilename(fileName) {
|
|
50
|
+
return relative(process.cwd(), fileName);
|
|
51
|
+
}
|
|
52
|
+
#printTest(payload) {
|
|
53
|
+
const icon = this.#getTestIcon(payload);
|
|
54
|
+
const message = this.#getTestMessage(payload);
|
|
55
|
+
const prefix = payload.isPinned ? colors.yellow("[PINNED] ") : "";
|
|
56
|
+
const indentation = this.currentFileName || this.currentGroupName ? " " : "";
|
|
57
|
+
const duration = colors.dim(`(${string.milliseconds.format(Number(payload.duration.toFixed(2)))})`);
|
|
58
|
+
const retries = payload.retryAttempt && payload.retryAttempt > 1 ? colors.dim(`(x${payload.retryAttempt}) `) : "";
|
|
59
|
+
let subText = this.#getSubText(payload);
|
|
60
|
+
subText = subText ? `\n${indentation} ${subText}` : "";
|
|
61
|
+
console.log(`${indentation}${icon} ${prefix}${retries}${message} ${duration}${subText}`);
|
|
62
|
+
}
|
|
63
|
+
#printGroup(payload) {
|
|
64
|
+
const title = this.currentSuiteName !== "default" ? `${this.currentSuiteName} / ${payload.title}` : payload.title;
|
|
65
|
+
const suffix = this.currentFileName ? colors.dim(` (${this.#getRelativeFilename(this.currentFileName)})`) : "";
|
|
66
|
+
console.log(`\n${title}${suffix}`);
|
|
67
|
+
}
|
|
68
|
+
onTestStart() {
|
|
69
|
+
if (this.currentFileName && this.#isFirstLoneTest) console.log(`\n${colors.dim(this.#getRelativeFilename(this.currentFileName))}`);
|
|
70
|
+
this.#isFirstLoneTest = false;
|
|
71
|
+
}
|
|
72
|
+
onTestEnd(payload) {
|
|
73
|
+
this.#printTest(payload);
|
|
74
|
+
}
|
|
75
|
+
onGroupStart(payload) {
|
|
76
|
+
this.#isFirstLoneTest = false;
|
|
77
|
+
this.#printGroup(payload);
|
|
78
|
+
}
|
|
79
|
+
onGroupEnd() {
|
|
80
|
+
this.#isFirstLoneTest = true;
|
|
81
|
+
}
|
|
82
|
+
async end() {
|
|
83
|
+
const summary = this.runner.getSummary();
|
|
84
|
+
await this.printSummary(summary);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const list = [
|
|
88
|
+
Error,
|
|
89
|
+
EvalError,
|
|
90
|
+
RangeError,
|
|
91
|
+
ReferenceError,
|
|
92
|
+
SyntaxError,
|
|
93
|
+
TypeError,
|
|
94
|
+
URIError,
|
|
95
|
+
AggregateError,
|
|
96
|
+
globalThis.DOMException,
|
|
97
|
+
globalThis.AssertionError,
|
|
98
|
+
globalThis.SystemError
|
|
99
|
+
].filter(Boolean).map((constructor) => [constructor.name, constructor]);
|
|
100
|
+
const errorConstructors = new Map(list);
|
|
101
|
+
Error;
|
|
102
|
+
const errorProperties = [
|
|
103
|
+
{
|
|
104
|
+
property: "name",
|
|
105
|
+
enumerable: false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
property: "message",
|
|
109
|
+
enumerable: false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
property: "stack",
|
|
113
|
+
enumerable: false
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
property: "code",
|
|
117
|
+
enumerable: true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
property: "cause",
|
|
121
|
+
enumerable: false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
property: "errors",
|
|
125
|
+
enumerable: false
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
const toJsonWasCalled = /* @__PURE__ */ new WeakSet();
|
|
129
|
+
const toJSON = (from) => {
|
|
130
|
+
toJsonWasCalled.add(from);
|
|
131
|
+
const json = from.toJSON();
|
|
132
|
+
toJsonWasCalled.delete(from);
|
|
133
|
+
return json;
|
|
134
|
+
};
|
|
135
|
+
const newError = (name) => {
|
|
136
|
+
const ErrorConstructor = errorConstructors.get(name) ?? Error;
|
|
137
|
+
return ErrorConstructor === AggregateError ? new ErrorConstructor([]) : new ErrorConstructor();
|
|
138
|
+
};
|
|
139
|
+
const destroyCircular = ({ from, seen, to, forceEnumerable, maxDepth, depth, useToJSON, serialize }) => {
|
|
140
|
+
if (!to) if (Array.isArray(from)) to = [];
|
|
141
|
+
else if (!serialize && isErrorLike(from)) to = newError(from.name);
|
|
142
|
+
else to = {};
|
|
143
|
+
seen.push(from);
|
|
144
|
+
if (depth >= maxDepth) return to;
|
|
145
|
+
if (useToJSON && typeof from.toJSON === "function" && !toJsonWasCalled.has(from)) return toJSON(from);
|
|
146
|
+
const continueDestroyCircular = (value) => destroyCircular({
|
|
147
|
+
from: value,
|
|
148
|
+
seen: [...seen],
|
|
149
|
+
forceEnumerable,
|
|
150
|
+
maxDepth,
|
|
151
|
+
depth,
|
|
152
|
+
useToJSON,
|
|
153
|
+
serialize
|
|
154
|
+
});
|
|
155
|
+
for (const [key, value] of Object.entries(from)) {
|
|
156
|
+
if (value && value instanceof Uint8Array && value.constructor.name === "Buffer") {
|
|
157
|
+
to[key] = "[object Buffer]";
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (value !== null && typeof value === "object" && typeof value.pipe === "function") {
|
|
161
|
+
to[key] = "[object Stream]";
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (typeof value === "function") continue;
|
|
165
|
+
if (!value || typeof value !== "object") {
|
|
166
|
+
try {
|
|
167
|
+
to[key] = value;
|
|
168
|
+
} catch {}
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (!seen.includes(from[key])) {
|
|
172
|
+
depth++;
|
|
173
|
+
to[key] = continueDestroyCircular(from[key]);
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
to[key] = "[Circular]";
|
|
177
|
+
}
|
|
178
|
+
if (serialize || to instanceof Error) {
|
|
179
|
+
for (const { property, enumerable } of errorProperties) if (from[property] !== void 0 && from[property] !== null) Object.defineProperty(to, property, {
|
|
180
|
+
value: isErrorLike(from[property]) || Array.isArray(from[property]) ? continueDestroyCircular(from[property]) : from[property],
|
|
181
|
+
enumerable: forceEnumerable ? true : enumerable,
|
|
182
|
+
configurable: true,
|
|
183
|
+
writable: true
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return to;
|
|
187
|
+
};
|
|
188
|
+
function serializeError(value, options = {}) {
|
|
189
|
+
const { maxDepth = Number.POSITIVE_INFINITY, useToJSON = true } = options;
|
|
190
|
+
if (typeof value === "object" && value !== null) return destroyCircular({
|
|
191
|
+
from: value,
|
|
192
|
+
seen: [],
|
|
193
|
+
forceEnumerable: true,
|
|
194
|
+
maxDepth,
|
|
195
|
+
depth: 0,
|
|
196
|
+
useToJSON,
|
|
197
|
+
serialize: true
|
|
198
|
+
});
|
|
199
|
+
if (typeof value === "function") return `[Function: ${value.name || "anonymous"}]`;
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
function isErrorLike(value) {
|
|
203
|
+
return Boolean(value) && typeof value === "object" && typeof value.name === "string" && typeof value.message === "string" && typeof value.stack === "string";
|
|
204
|
+
}
|
|
205
|
+
var NdJSONReporter = class extends BaseReporter {
|
|
206
|
+
#getRelativeFilename(fileName) {
|
|
207
|
+
return relative(process.cwd(), fileName);
|
|
208
|
+
}
|
|
209
|
+
#serializeErrors(errors) {
|
|
210
|
+
return errors.map((error) => ({
|
|
211
|
+
phase: error.phase,
|
|
212
|
+
error: serializeError(error.error)
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
onTestEnd(payload) {
|
|
216
|
+
console.log(JSON.stringify({
|
|
217
|
+
event: "test:end",
|
|
218
|
+
filePath: this.currentFileName,
|
|
219
|
+
relativePath: this.currentFileName ? this.#getRelativeFilename(this.currentFileName) : void 0,
|
|
220
|
+
title: payload.title,
|
|
221
|
+
duration: payload.duration,
|
|
222
|
+
failReason: payload.failReason,
|
|
223
|
+
isFailing: payload.isFailing,
|
|
224
|
+
skipReason: payload.skipReason,
|
|
225
|
+
isSkipped: payload.isSkipped,
|
|
226
|
+
isTodo: payload.isTodo,
|
|
227
|
+
isPinned: payload.isPinned,
|
|
228
|
+
retryAttempt: payload.retryAttempt,
|
|
229
|
+
retries: payload.retries,
|
|
230
|
+
errors: this.#serializeErrors(payload.errors)
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
onGroupStart(payload) {
|
|
234
|
+
console.log(JSON.stringify({
|
|
235
|
+
event: "group:start",
|
|
236
|
+
title: payload.title
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
onGroupEnd(payload) {
|
|
240
|
+
JSON.stringify({
|
|
241
|
+
event: "group:end",
|
|
242
|
+
title: payload.title,
|
|
243
|
+
errors: this.#serializeErrors(payload.errors)
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
onSuiteStart(payload) {
|
|
247
|
+
console.log(JSON.stringify({
|
|
248
|
+
event: "suite:start",
|
|
249
|
+
...payload
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
onSuiteEnd(payload) {
|
|
253
|
+
console.log(JSON.stringify({
|
|
254
|
+
event: "suite:end",
|
|
255
|
+
name: payload.name,
|
|
256
|
+
hasError: payload.hasError,
|
|
257
|
+
errors: this.#serializeErrors(payload.errors)
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
async end() {
|
|
261
|
+
const summary = this.runner.getSummary();
|
|
262
|
+
console.log(JSON.stringify({
|
|
263
|
+
aggregates: summary.aggregates,
|
|
264
|
+
duration: summary.duration,
|
|
265
|
+
failedTestsTitles: summary.failedTestsTitles,
|
|
266
|
+
hasError: summary.hasError
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
var GithubReporter = class extends BaseReporter {
|
|
271
|
+
escapeMessage(value) {
|
|
272
|
+
return value.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
|
|
273
|
+
}
|
|
274
|
+
escapeProperty(value) {
|
|
275
|
+
return value.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C");
|
|
276
|
+
}
|
|
277
|
+
formatMessage({ command, properties, message }) {
|
|
278
|
+
let result = `::${command}`;
|
|
279
|
+
Object.entries(properties).forEach(([k, v], i) => {
|
|
280
|
+
result += i === 0 ? " " : ",";
|
|
281
|
+
result += `${k}=${this.escapeProperty(v)}`;
|
|
282
|
+
});
|
|
283
|
+
result += `::${this.escapeMessage(message)}`;
|
|
284
|
+
return result;
|
|
285
|
+
}
|
|
286
|
+
async getErrorAnnotation(printer, error) {
|
|
287
|
+
const parsedError = await printer.parseError(error.error);
|
|
288
|
+
if (!("frames" in parsedError)) return;
|
|
289
|
+
const mainFrame = parsedError.frames.find((frame) => frame.type === "app");
|
|
290
|
+
if (!mainFrame) return;
|
|
291
|
+
return this.formatMessage({
|
|
292
|
+
command: "error",
|
|
293
|
+
properties: {
|
|
294
|
+
file: string.toUnixSlash(relative(process.cwd(), mainFrame.fileName)),
|
|
295
|
+
title: error.title,
|
|
296
|
+
line: String(mainFrame.lineNumber),
|
|
297
|
+
column: String(mainFrame.columnNumber)
|
|
298
|
+
},
|
|
299
|
+
message: stripVTControlCharacters(parsedError.message)
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
async end() {
|
|
303
|
+
const summary = this.runner.getSummary();
|
|
304
|
+
const errorsList = this.aggregateErrors(summary);
|
|
305
|
+
const errorPrinter = new ErrorsPrinter(this.options);
|
|
306
|
+
for (let error of errorsList) {
|
|
307
|
+
const formatted = await this.getErrorAnnotation(errorPrinter, error);
|
|
308
|
+
if (formatted) console.log(`\n${formatted}`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const spec = (options) => {
|
|
313
|
+
return {
|
|
314
|
+
name: "spec",
|
|
315
|
+
handler: (...args) => new SpecReporter(options).boot(...args)
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
const dot = (options) => {
|
|
319
|
+
return {
|
|
320
|
+
name: "dot",
|
|
321
|
+
handler: (...args) => new DotReporter(options).boot(...args)
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
const ndjson = (options) => {
|
|
325
|
+
return {
|
|
326
|
+
name: "ndjson",
|
|
327
|
+
handler: (...args) => new NdJSONReporter(options).boot(...args)
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
const github = (options) => {
|
|
331
|
+
return {
|
|
332
|
+
name: "github",
|
|
333
|
+
handler: (...args) => new GithubReporter(options).boot(...args)
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
export { spec as i, github as n, ndjson as r, dot as t };
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
Emitter,
|
|
4
|
-
Group,
|
|
5
|
-
Refiner,
|
|
6
|
-
Runner,
|
|
7
|
-
Suite,
|
|
8
|
-
Test,
|
|
9
|
-
TestContext
|
|
10
|
-
} from "../../chunk-L7YZLDZD.js";
|
|
11
|
-
import "../../chunk-2KG3PWR4.js";
|
|
12
|
-
export {
|
|
13
|
-
BaseReporter,
|
|
14
|
-
Emitter,
|
|
15
|
-
Group,
|
|
16
|
-
Refiner,
|
|
17
|
-
Runner,
|
|
18
|
-
Suite,
|
|
19
|
-
Test,
|
|
20
|
-
TestContext
|
|
21
|
-
};
|
|
1
|
+
import { a as Group, c as Suite, d as BaseReporter, i as Emitter, l as Test, o as Refiner, s as Runner, u as TestContext } from "../../helpers-BlHaYYTh.js";
|
|
2
|
+
export { BaseReporter, Emitter, Group, Refiner, Runner, Suite, Test, TestContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Emitter, Runner } from '../main.js';
|
|
1
|
+
import { type Emitter, type Runner } from '../main.js';
|
|
2
2
|
import type { TestEndNode, SuiteEndNode, GroupEndNode, TestStartNode, RunnerSummary, RunnerEndNode, GroupStartNode, SuiteStartNode, RunnerStartNode, BaseReporterOptions } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Base reporter to build custom reporters on top of
|
package/build/src/debug.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("util").DebugLogger;
|
|
1
|
+
declare const _default: import("node:util").DebugLogger;
|
|
2
2
|
export default _default;
|
package/build/src/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Colors } from '@poppinss/colors/types';
|
|
2
|
-
import { Runner, Test } from '../modules/core/main.js';
|
|
1
|
+
import { type Colors } from '@poppinss/colors/types';
|
|
2
|
+
import { type Runner, type Test } from '../modules/core/main.js';
|
|
3
3
|
export declare const colors: Colors;
|
|
4
4
|
/**
|
|
5
5
|
* A collection of platform specific icons
|
package/build/src/hooks.d.ts
CHANGED
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import "../../chunk-2KG3PWR4.js";
|
|
2
|
-
|
|
3
|
-
// src/plugins/disallow_pinned_tests.ts
|
|
4
1
|
import string from "@poppinss/string";
|
|
5
2
|
function disallowPinnedTests(options) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
return pluginFn;
|
|
3
|
+
const disallow = options?.disallow ?? true;
|
|
4
|
+
const errorMessage = options?.errorMessage ?? "Pinning tests are disallowed by the \"disallowPinnedTests\" plugin. Use the \"--list-pinned\" flag to list pinned tests";
|
|
5
|
+
return async function disallowPinnedTestsPluginFn({ runner, emitter }) {
|
|
6
|
+
if (!disallow) return;
|
|
7
|
+
function disallowPinned(test) {
|
|
8
|
+
if (test.isPinned) {
|
|
9
|
+
test.options.meta.abort(string.interpolate(errorMessage, { test: test.title }));
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
emitter.on("runner:start", () => {
|
|
14
|
+
runner.onSuite((suite) => {
|
|
15
|
+
suite.onGroup((group) => {
|
|
16
|
+
group.tap(disallowPinned);
|
|
17
|
+
});
|
|
18
|
+
suite.onTest(disallowPinned);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
28
22
|
}
|
|
29
|
-
export {
|
|
30
|
-
disallowPinnedTests
|
|
31
|
-
};
|
|
23
|
+
export { disallowPinnedTests };
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ndjson,
|
|
5
|
-
spec
|
|
6
|
-
} from "../../chunk-RFKFNXTE.js";
|
|
7
|
-
import "../../chunk-L7YZLDZD.js";
|
|
8
|
-
import "../../chunk-2KG3PWR4.js";
|
|
9
|
-
export {
|
|
10
|
-
dot,
|
|
11
|
-
github,
|
|
12
|
-
ndjson,
|
|
13
|
-
spec
|
|
14
|
-
};
|
|
1
|
+
import "../../helpers-BlHaYYTh.js";
|
|
2
|
+
import { i as spec, n as github, r as ndjson, t as dot } from "../../main-CB1nhl6c.js";
|
|
3
|
+
export { dot, github, ndjson, spec };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseReporter } from '../../modules/core/main.js';
|
|
2
|
-
import { GroupStartNode, TestEndNode } from '../../modules/core/types.js';
|
|
2
|
+
import { type GroupStartNode, type TestEndNode } from '../../modules/core/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Pretty prints the tests on the console
|
|
5
5
|
*/
|
package/build/src/types.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// modules/core/types.ts
|
|
9
|
-
var types_exports = {};
|
|
10
|
-
__reExport(types_exports, types_star);
|
|
11
|
-
import * as types_star from "@japa/core/types";
|
|
12
|
-
|
|
13
|
-
// src/types.ts
|
|
14
|
-
__reExport(types_exports2, types_exports);
|
|
1
|
+
import "node:module";
|
|
2
|
+
export * from "@japa/core/types";
|
|
3
|
+
Object.defineProperty;
|
|
4
|
+
Object.getOwnPropertyDescriptor;
|
|
5
|
+
Object.getOwnPropertyNames;
|
|
6
|
+
Object.prototype.hasOwnProperty;
|
|
7
|
+
export {};
|
package/build/src/validator.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@japa/runner",
|
|
3
3
|
"description": "A simple yet powerful testing framework for Node.js",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.1",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.16.0"
|
|
7
7
|
},
|
|
@@ -28,48 +28,43 @@
|
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
29
|
"clean": "del-cli build",
|
|
30
30
|
"precompile": "npm run lint && npm run clean",
|
|
31
|
-
"compile": "
|
|
31
|
+
"compile": "tsdown && tsc --emitDeclarationOnly --declaration",
|
|
32
32
|
"build": "npm run compile",
|
|
33
33
|
"version": "npm run build",
|
|
34
34
|
"prepublishOnly": "npm run build",
|
|
35
35
|
"release": "release-it",
|
|
36
|
-
"quick:test": "
|
|
36
|
+
"quick:test": "node --import=@poppinss/ts-exec --enable-source-maps --test-reporter=spec --test tests/*.spec.ts"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@adonisjs/eslint-config": "^
|
|
39
|
+
"@adonisjs/eslint-config": "^3.0.0-next.5",
|
|
40
40
|
"@adonisjs/prettier-config": "^1.4.5",
|
|
41
|
-
"@adonisjs/tsconfig": "^
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@types/chai": "^5.2.
|
|
45
|
-
"@types/
|
|
46
|
-
"@types/node": "^24.2.1",
|
|
41
|
+
"@adonisjs/tsconfig": "^2.0.0-next.3",
|
|
42
|
+
"@poppinss/ts-exec": "^1.4.1",
|
|
43
|
+
"@release-it/conventional-changelog": "^10.0.3",
|
|
44
|
+
"@types/chai": "^5.2.3",
|
|
45
|
+
"@types/node": "^25.0.1",
|
|
47
46
|
"c8": "^10.1.3",
|
|
48
|
-
"chai": "^
|
|
49
|
-
"cross-env": "^10.
|
|
50
|
-
"del-cli": "^
|
|
51
|
-
"eslint": "^9.
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"typescript": "^5.9.2"
|
|
47
|
+
"chai": "^6.2.1",
|
|
48
|
+
"cross-env": "^10.1.0",
|
|
49
|
+
"del-cli": "^7.0.0",
|
|
50
|
+
"eslint": "^9.39.2",
|
|
51
|
+
"prettier": "^3.7.4",
|
|
52
|
+
"release-it": "^19.1.0",
|
|
53
|
+
"serialize-error": "^12.0.0",
|
|
54
|
+
"tsdown": "^0.17.3",
|
|
55
|
+
"typescript": "^5.9.3"
|
|
58
56
|
},
|
|
59
57
|
"dependencies": {
|
|
60
|
-
"@japa/core": "^10.
|
|
61
|
-
"@japa/errors-printer": "^4.1.
|
|
62
|
-
"@poppinss/colors": "^4.1.
|
|
63
|
-
"@poppinss/
|
|
64
|
-
"@poppinss/
|
|
58
|
+
"@japa/core": "^10.4.0",
|
|
59
|
+
"@japa/errors-printer": "^4.1.4",
|
|
60
|
+
"@poppinss/colors": "^4.1.6",
|
|
61
|
+
"@poppinss/utils": "7.0.0-next.6",
|
|
62
|
+
"@poppinss/hooks": "^7.3.0",
|
|
63
|
+
"@poppinss/string": "^1.7.1",
|
|
65
64
|
"error-stack-parser-es": "^1.0.5",
|
|
66
|
-
"fast-glob": "^3.3.3",
|
|
67
65
|
"find-cache-directory": "^6.0.0",
|
|
68
66
|
"getopts": "^2.3.0",
|
|
69
|
-
"
|
|
70
|
-
"serialize-error": "^12.0.0",
|
|
71
|
-
"slash": "^5.1.0",
|
|
72
|
-
"supports-color": "^10.1.0"
|
|
67
|
+
"supports-color": "^10.2.2"
|
|
73
68
|
},
|
|
74
69
|
"homepage": "https://github.com/japa/runner#readme",
|
|
75
70
|
"repository": {
|
|
@@ -90,7 +85,7 @@
|
|
|
90
85
|
"access": "public",
|
|
91
86
|
"provenance": true
|
|
92
87
|
},
|
|
93
|
-
"
|
|
88
|
+
"tsdown": {
|
|
94
89
|
"entry": [
|
|
95
90
|
"./index.ts",
|
|
96
91
|
"./src/types.ts",
|
|
@@ -102,8 +97,11 @@
|
|
|
102
97
|
"outDir": "./build",
|
|
103
98
|
"clean": true,
|
|
104
99
|
"format": "esm",
|
|
100
|
+
"minify": "dce-only",
|
|
101
|
+
"fixedExtension": false,
|
|
105
102
|
"dts": false,
|
|
106
|
-
"
|
|
103
|
+
"treeshake": false,
|
|
104
|
+
"sourcemaps": false,
|
|
107
105
|
"target": "esnext"
|
|
108
106
|
},
|
|
109
107
|
"release-it": {
|
package/build/chunk-2KG3PWR4.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
__reExport
|
|
17
|
-
};
|