@jsenv/test 1.1.2 → 1.1.3
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/dist/jsenv_test.js +4 -2
- package/package.json +2 -2
- package/src/coverage/babel_plugin_instrument.js +15 -15
- package/src/coverage/coverage_reporter_html_directory.js +10 -10
- package/src/coverage/coverage_reporter_json_file.js +7 -7
- package/src/coverage/coverage_reporter_text_log.js +8 -8
- package/src/coverage/empty_coverage_factory.js +24 -24
- package/src/coverage/file_by_file_coverage.js +10 -10
- package/src/coverage/istanbul_coverage_composition.js +16 -16
- package/src/coverage/istanbul_coverage_map_from_coverage.js +8 -8
- package/src/coverage/list_files_not_covered.js +4 -4
- package/src/coverage/missing_coverage.js +17 -17
- package/src/coverage/report_to_coverage.js +52 -52
- package/src/coverage/v8_and_istanbul.js +17 -16
- package/src/coverage/v8_coverage.js +8 -8
- package/src/coverage/v8_coverage_composition.js +12 -12
- package/src/coverage/v8_coverage_node_directory.js +42 -42
- package/src/coverage/v8_coverage_to_istanbul.js +45 -45
- package/src/execution/execute.js +21 -21
- package/src/execution/execute_steps.js +129 -129
- package/src/execution/execute_test_plan.js +72 -68
- package/src/execution/execution_colors.js +2 -2
- package/src/execution/execution_steps.js +20 -20
- package/src/execution/gc.js +5 -5
- package/src/execution/logs_file_execution.js +126 -126
- package/src/execution/logs_file_execution.test.mjs +11 -11
- package/src/execution/run.js +51 -51
- package/src/execution/web_server_param.js +24 -24
- package/src/main.js +7 -7
- package/src/runtime_browsers/chromium.js +7 -7
- package/src/runtime_browsers/firefox.js +10 -10
- package/src/runtime_browsers/middleware_istanbul.js +23 -23
- package/src/runtime_browsers/middleware_js_supervisor.js +32 -32
- package/src/runtime_browsers/using_playwright.js +186 -186
- package/src/runtime_browsers/webkit.js +11 -11
- package/src/runtime_node/child_exec_options.js +43 -43
- package/src/runtime_node/controllable_child_process.mjs +47 -47
- package/src/runtime_node/controllable_worker_thread.mjs +37 -37
- package/src/runtime_node/exec_options.js +26 -26
- package/src/runtime_node/execute_using_dynamic_import.js +26 -26
- package/src/runtime_node/exit_codes.js +4 -4
- package/src/runtime_node/importmap_node_loader.mjs +24 -24
- package/src/runtime_node/importmap_node_loader_file_url.js +1 -1
- package/src/runtime_node/kill_process_tree.js +30 -30
- package/src/runtime_node/no_experimental_warnings.cjs +4 -4
- package/src/runtime_node/no_experimental_warnings_file_url.js +1 -1
- package/src/runtime_node/node_child_process.js +128 -128
- package/src/runtime_node/node_execution_performance.js +28 -28
- package/src/runtime_node/node_worker_thread.js +108 -108
- package/src/runtime_node/profiler_v8_coverage.js +21 -21
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// https://github.com/avajs/ava/blob/576f534b345259055c95fa0c2b33bef10847a2af/lib/fork.js#L23
|
|
2
2
|
// https://nodejs.org/api/worker_threads.html
|
|
3
3
|
// https://github.com/avajs/ava/blob/576f534b345259055c95fa0c2b33bef10847a2af/lib/worker/base.js
|
|
4
|
-
import { Worker } from "node:worker_threads"
|
|
5
|
-
import { fileURLToPath } from "node:url"
|
|
4
|
+
import { Worker } from "node:worker_threads";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
6
|
import {
|
|
7
7
|
Abort,
|
|
8
8
|
createCallbackListNotifiedOnce,
|
|
9
9
|
raceCallbacks,
|
|
10
|
-
} from "@jsenv/abort"
|
|
11
|
-
import { memoize } from "@jsenv/utils/src/memoize/memoize.js"
|
|
10
|
+
} from "@jsenv/abort";
|
|
11
|
+
import { memoize } from "@jsenv/utils/src/memoize/memoize.js";
|
|
12
12
|
|
|
13
|
-
import { createChildExecOptions } from "./child_exec_options.js"
|
|
14
|
-
import { ExecOptions } from "./exec_options.js"
|
|
15
|
-
import { EXIT_CODES } from "./exit_codes.js"
|
|
16
|
-
import { IMPORTMAP_NODE_LOADER_FILE_URL } from "./importmap_node_loader_file_url.js"
|
|
17
|
-
import { NO_EXPERIMENTAL_WARNING_FILE_URL } from "./no_experimental_warnings_file_url.js"
|
|
13
|
+
import { createChildExecOptions } from "./child_exec_options.js";
|
|
14
|
+
import { ExecOptions } from "./exec_options.js";
|
|
15
|
+
import { EXIT_CODES } from "./exit_codes.js";
|
|
16
|
+
import { IMPORTMAP_NODE_LOADER_FILE_URL } from "./importmap_node_loader_file_url.js";
|
|
17
|
+
import { NO_EXPERIMENTAL_WARNING_FILE_URL } from "./no_experimental_warnings_file_url.js";
|
|
18
18
|
|
|
19
19
|
const CONTROLLABLE_WORKER_THREAD_URL = new URL(
|
|
20
20
|
"./controllable_worker_thread.mjs?entry_point",
|
|
21
21
|
import.meta.url,
|
|
22
|
-
).href
|
|
22
|
+
).href;
|
|
23
23
|
|
|
24
24
|
export const nodeWorkerThread = ({
|
|
25
25
|
importMap,
|
|
@@ -31,12 +31,12 @@ export const nodeWorkerThread = ({
|
|
|
31
31
|
commandLineOptions = [],
|
|
32
32
|
} = {}) => {
|
|
33
33
|
if (env !== undefined && typeof env !== "object") {
|
|
34
|
-
throw new TypeError(`env must be an object, got ${env}`)
|
|
34
|
+
throw new TypeError(`env must be an object, got ${env}`);
|
|
35
35
|
}
|
|
36
36
|
env = {
|
|
37
37
|
...env,
|
|
38
38
|
JSENV: true,
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
|
|
41
41
|
return {
|
|
42
42
|
type: "node",
|
|
@@ -60,17 +60,17 @@ export const nodeWorkerThread = ({
|
|
|
60
60
|
coverageFileUrl,
|
|
61
61
|
}) => {
|
|
62
62
|
if (coverageMethodForNodeJs !== "NODE_V8_COVERAGE") {
|
|
63
|
-
env.NODE_V8_COVERAGE = ""
|
|
63
|
+
env.NODE_V8_COVERAGE = "";
|
|
64
64
|
}
|
|
65
65
|
if (importMap) {
|
|
66
|
-
env.IMPORT_MAP = JSON.stringify(importMap)
|
|
67
|
-
env.IMPORT_MAP_BASE_URL = rootDirectoryUrl
|
|
66
|
+
env.IMPORT_MAP = JSON.stringify(importMap);
|
|
67
|
+
env.IMPORT_MAP_BASE_URL = rootDirectoryUrl;
|
|
68
68
|
commandLineOptions.push(
|
|
69
69
|
`--experimental-loader=${IMPORTMAP_NODE_LOADER_FILE_URL}`,
|
|
70
|
-
)
|
|
70
|
+
);
|
|
71
71
|
commandLineOptions.push(
|
|
72
72
|
`--require=${fileURLToPath(NO_EXPERIMENTAL_WARNING_FILE_URL)}`,
|
|
73
|
-
)
|
|
73
|
+
);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const workerThreadExecOptions = await createChildExecOptions({
|
|
@@ -78,22 +78,22 @@ export const nodeWorkerThread = ({
|
|
|
78
78
|
debugPort,
|
|
79
79
|
debugMode,
|
|
80
80
|
debugModeInheritBreak,
|
|
81
|
-
})
|
|
81
|
+
});
|
|
82
82
|
const execArgvForWorkerThread = ExecOptions.toExecArgv({
|
|
83
83
|
...workerThreadExecOptions,
|
|
84
84
|
...ExecOptions.fromExecArgv(commandLineOptions),
|
|
85
|
-
})
|
|
85
|
+
});
|
|
86
86
|
const envForWorkerThread = {
|
|
87
87
|
...(inheritProcessEnv ? process.env : {}),
|
|
88
88
|
...env,
|
|
89
|
-
}
|
|
89
|
+
};
|
|
90
90
|
|
|
91
|
-
const cleanupCallbackList = createCallbackListNotifiedOnce()
|
|
91
|
+
const cleanupCallbackList = createCallbackListNotifiedOnce();
|
|
92
92
|
const cleanup = async (reason) => {
|
|
93
|
-
await cleanupCallbackList.notify({ reason })
|
|
94
|
-
}
|
|
95
|
-
const actionOperation = Abort.startOperation()
|
|
96
|
-
actionOperation.addAbortSignal(signal)
|
|
93
|
+
await cleanupCallbackList.notify({ reason });
|
|
94
|
+
};
|
|
95
|
+
const actionOperation = Abort.startOperation();
|
|
96
|
+
actionOperation.addAbortSignal(signal);
|
|
97
97
|
// https://nodejs.org/api/worker_threads.html#new-workerfilename-options
|
|
98
98
|
const workerThread = new Worker(
|
|
99
99
|
fileURLToPath(CONTROLLABLE_WORKER_THREAD_URL),
|
|
@@ -105,16 +105,16 @@ export const nodeWorkerThread = ({
|
|
|
105
105
|
stdout: true,
|
|
106
106
|
stderr: true,
|
|
107
107
|
},
|
|
108
|
-
)
|
|
108
|
+
);
|
|
109
109
|
const removeOutputListener = installWorkerThreadOutputListener(
|
|
110
110
|
workerThread,
|
|
111
111
|
({ type, text }) => {
|
|
112
|
-
onConsole({ type, text })
|
|
112
|
+
onConsole({ type, text });
|
|
113
113
|
},
|
|
114
|
-
)
|
|
114
|
+
);
|
|
115
115
|
const workerThreadReadyPromise = new Promise((resolve) => {
|
|
116
|
-
onceWorkerThreadMessage(workerThread, "ready", resolve)
|
|
117
|
-
})
|
|
116
|
+
onceWorkerThreadMessage(workerThread, "ready", resolve);
|
|
117
|
+
});
|
|
118
118
|
|
|
119
119
|
const stop = memoize(async () => {
|
|
120
120
|
// read all stdout before terminating
|
|
@@ -122,48 +122,48 @@ export const nodeWorkerThread = ({
|
|
|
122
122
|
if (collectConsole) {
|
|
123
123
|
while (workerThread.stdout.read() !== null) {}
|
|
124
124
|
await new Promise((resolve) => {
|
|
125
|
-
setTimeout(resolve, 50)
|
|
126
|
-
})
|
|
125
|
+
setTimeout(resolve, 50);
|
|
126
|
+
});
|
|
127
127
|
}
|
|
128
|
-
await workerThread.terminate()
|
|
129
|
-
})
|
|
128
|
+
await workerThread.terminate();
|
|
129
|
+
});
|
|
130
130
|
|
|
131
131
|
const winnerPromise = new Promise((resolve) => {
|
|
132
132
|
raceCallbacks(
|
|
133
133
|
{
|
|
134
134
|
aborted: (cb) => {
|
|
135
|
-
return actionOperation.addAbortCallback(cb)
|
|
135
|
+
return actionOperation.addAbortCallback(cb);
|
|
136
136
|
},
|
|
137
137
|
error: (cb) => {
|
|
138
|
-
return onceWorkerThreadEvent(workerThread, "error", cb)
|
|
138
|
+
return onceWorkerThreadEvent(workerThread, "error", cb);
|
|
139
139
|
},
|
|
140
140
|
exit: (cb) => {
|
|
141
141
|
return onceWorkerThreadEvent(
|
|
142
142
|
workerThread,
|
|
143
143
|
"exit",
|
|
144
144
|
(code, signal) => {
|
|
145
|
-
cb({ code, signal })
|
|
145
|
+
cb({ code, signal });
|
|
146
146
|
},
|
|
147
|
-
)
|
|
147
|
+
);
|
|
148
148
|
},
|
|
149
149
|
response: (cb) => {
|
|
150
|
-
return onceWorkerThreadMessage(workerThread, "action-result", cb)
|
|
150
|
+
return onceWorkerThreadMessage(workerThread, "action-result", cb);
|
|
151
151
|
},
|
|
152
152
|
},
|
|
153
153
|
resolve,
|
|
154
|
-
)
|
|
155
|
-
})
|
|
154
|
+
);
|
|
155
|
+
});
|
|
156
156
|
|
|
157
157
|
const result = {
|
|
158
158
|
status: "executing",
|
|
159
159
|
errors: [],
|
|
160
160
|
namespace: null,
|
|
161
|
-
}
|
|
161
|
+
};
|
|
162
162
|
|
|
163
163
|
const writeResult = async () => {
|
|
164
|
-
actionOperation.throwIfAborted()
|
|
165
|
-
await workerThreadReadyPromise
|
|
166
|
-
actionOperation.throwIfAborted()
|
|
164
|
+
actionOperation.throwIfAborted();
|
|
165
|
+
await workerThreadReadyPromise;
|
|
166
|
+
actionOperation.throwIfAborted();
|
|
167
167
|
await sendToWorkerThread(workerThread, {
|
|
168
168
|
type: "action",
|
|
169
169
|
data: {
|
|
@@ -179,30 +179,30 @@ export const nodeWorkerThread = ({
|
|
|
179
179
|
exitAfterAction: true,
|
|
180
180
|
},
|
|
181
181
|
},
|
|
182
|
-
})
|
|
183
|
-
const winner = await winnerPromise
|
|
182
|
+
});
|
|
183
|
+
const winner = await winnerPromise;
|
|
184
184
|
if (winner.name === "aborted") {
|
|
185
|
-
result.status = "aborted"
|
|
186
|
-
return
|
|
185
|
+
result.status = "aborted";
|
|
186
|
+
return;
|
|
187
187
|
}
|
|
188
188
|
if (winner.name === "error") {
|
|
189
|
-
const error = winner.data
|
|
190
|
-
removeOutputListener()
|
|
191
|
-
result.status = "failed"
|
|
192
|
-
result.errors.push(error)
|
|
193
|
-
return
|
|
189
|
+
const error = winner.data;
|
|
190
|
+
removeOutputListener();
|
|
191
|
+
result.status = "failed";
|
|
192
|
+
result.errors.push(error);
|
|
193
|
+
return;
|
|
194
194
|
}
|
|
195
195
|
if (winner.name === "exit") {
|
|
196
|
-
const { code } = winner.data
|
|
197
|
-
await cleanup("process exit")
|
|
196
|
+
const { code } = winner.data;
|
|
197
|
+
await cleanup("process exit");
|
|
198
198
|
if (code === 12) {
|
|
199
|
-
result.status = "failed"
|
|
199
|
+
result.status = "failed";
|
|
200
200
|
result.errors.push(
|
|
201
201
|
new Error(
|
|
202
202
|
`node process exited with 12 (the forked child process wanted to use a non-available port for debug)`,
|
|
203
203
|
),
|
|
204
|
-
)
|
|
205
|
-
return
|
|
204
|
+
);
|
|
205
|
+
return;
|
|
206
206
|
}
|
|
207
207
|
if (
|
|
208
208
|
code === null ||
|
|
@@ -211,91 +211,91 @@ export const nodeWorkerThread = ({
|
|
|
211
211
|
code === EXIT_CODES.SIGTERM ||
|
|
212
212
|
code === EXIT_CODES.SIGABORT
|
|
213
213
|
) {
|
|
214
|
-
result.status = "failed"
|
|
214
|
+
result.status = "failed";
|
|
215
215
|
result.errors.push(
|
|
216
216
|
new Error(`node worker thread exited during execution`),
|
|
217
|
-
)
|
|
218
|
-
return
|
|
217
|
+
);
|
|
218
|
+
return;
|
|
219
219
|
}
|
|
220
220
|
// process.exit(1) in child process or process.exitCode = 1 + process.exit()
|
|
221
221
|
// means there was an error even if we don't know exactly what.
|
|
222
|
-
result.status = "failed"
|
|
222
|
+
result.status = "failed";
|
|
223
223
|
result.errors.push(
|
|
224
224
|
new Error(
|
|
225
225
|
`node worker thread exited with code ${code} during execution`,
|
|
226
226
|
),
|
|
227
|
-
)
|
|
227
|
+
);
|
|
228
228
|
}
|
|
229
|
-
const { status, value } = winner.data
|
|
229
|
+
const { status, value } = winner.data;
|
|
230
230
|
if (status === "action-failed") {
|
|
231
|
-
result.status = "failed"
|
|
232
|
-
result.errors.push(value)
|
|
233
|
-
return
|
|
231
|
+
result.status = "failed";
|
|
232
|
+
result.errors.push(value);
|
|
233
|
+
return;
|
|
234
234
|
}
|
|
235
|
-
const { namespace, performance, coverage } = value
|
|
236
|
-
result.status = "completed"
|
|
237
|
-
result.namespace = namespace
|
|
238
|
-
result.performance = performance
|
|
239
|
-
result.coverage = coverage
|
|
240
|
-
}
|
|
235
|
+
const { namespace, performance, coverage } = value;
|
|
236
|
+
result.status = "completed";
|
|
237
|
+
result.namespace = namespace;
|
|
238
|
+
result.performance = performance;
|
|
239
|
+
result.coverage = coverage;
|
|
240
|
+
};
|
|
241
241
|
|
|
242
242
|
try {
|
|
243
|
-
await writeResult()
|
|
243
|
+
await writeResult();
|
|
244
244
|
} catch (e) {
|
|
245
|
-
result.status = "failed"
|
|
246
|
-
result.errors.push(e)
|
|
245
|
+
result.status = "failed";
|
|
246
|
+
result.errors.push(e);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
if (keepRunning) {
|
|
250
|
-
stopSignal.notify = stop
|
|
250
|
+
stopSignal.notify = stop;
|
|
251
251
|
} else {
|
|
252
|
-
await stop()
|
|
252
|
+
await stop();
|
|
253
253
|
}
|
|
254
|
-
await actionOperation.end()
|
|
255
|
-
return result
|
|
254
|
+
await actionOperation.end();
|
|
255
|
+
return result;
|
|
256
256
|
},
|
|
257
|
-
}
|
|
258
|
-
}
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
259
|
|
|
260
260
|
const installWorkerThreadOutputListener = (workerThread, callback) => {
|
|
261
261
|
// beware that we may receive ansi output here, should not be a problem but keep that in mind
|
|
262
262
|
const stdoutDataCallback = (chunk) => {
|
|
263
|
-
const text = String(chunk)
|
|
264
|
-
callback({ type: "log", text })
|
|
265
|
-
}
|
|
266
|
-
workerThread.stdout.on("data", stdoutDataCallback)
|
|
263
|
+
const text = String(chunk);
|
|
264
|
+
callback({ type: "log", text });
|
|
265
|
+
};
|
|
266
|
+
workerThread.stdout.on("data", stdoutDataCallback);
|
|
267
267
|
const stdErrorDataCallback = (chunk) => {
|
|
268
|
-
const text = String(chunk)
|
|
269
|
-
callback({ type: "error", text })
|
|
270
|
-
}
|
|
271
|
-
workerThread.stderr.on("data", stdErrorDataCallback)
|
|
268
|
+
const text = String(chunk);
|
|
269
|
+
callback({ type: "error", text });
|
|
270
|
+
};
|
|
271
|
+
workerThread.stderr.on("data", stdErrorDataCallback);
|
|
272
272
|
return () => {
|
|
273
|
-
workerThread.stdout.removeListener("data", stdoutDataCallback)
|
|
274
|
-
workerThread.stderr.removeListener("data", stdErrorDataCallback)
|
|
275
|
-
}
|
|
276
|
-
}
|
|
273
|
+
workerThread.stdout.removeListener("data", stdoutDataCallback);
|
|
274
|
+
workerThread.stderr.removeListener("data", stdErrorDataCallback);
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
277
|
|
|
278
278
|
const sendToWorkerThread = (worker, { type, data }) => {
|
|
279
|
-
worker.postMessage({ jsenv: true, type, data })
|
|
280
|
-
}
|
|
279
|
+
worker.postMessage({ jsenv: true, type, data });
|
|
280
|
+
};
|
|
281
281
|
|
|
282
282
|
const onceWorkerThreadMessage = (workerThread, type, callback) => {
|
|
283
283
|
const onmessage = (message) => {
|
|
284
284
|
if (message && message.jsenv && message.type === type) {
|
|
285
|
-
workerThread.removeListener("message", onmessage)
|
|
285
|
+
workerThread.removeListener("message", onmessage);
|
|
286
286
|
// eslint-disable-next-line no-eval
|
|
287
|
-
callback(message.data ? eval(`(${message.data})`) : undefined)
|
|
287
|
+
callback(message.data ? eval(`(${message.data})`) : undefined);
|
|
288
288
|
}
|
|
289
|
-
}
|
|
290
|
-
workerThread.on("message", onmessage)
|
|
289
|
+
};
|
|
290
|
+
workerThread.on("message", onmessage);
|
|
291
291
|
return () => {
|
|
292
|
-
workerThread.removeListener("message", onmessage)
|
|
293
|
-
}
|
|
294
|
-
}
|
|
292
|
+
workerThread.removeListener("message", onmessage);
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
295
|
|
|
296
296
|
const onceWorkerThreadEvent = (worker, type, callback) => {
|
|
297
|
-
worker.once(type, callback)
|
|
297
|
+
worker.once(type, callback);
|
|
298
298
|
return () => {
|
|
299
|
-
worker.removeListener(type, callback)
|
|
300
|
-
}
|
|
301
|
-
}
|
|
299
|
+
worker.removeListener(type, callback);
|
|
300
|
+
};
|
|
301
|
+
};
|
|
@@ -13,44 +13,44 @@
|
|
|
13
13
|
* - https://vanilla.aslushnikov.com/?Profiler.startPreciseCoverage
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Session } from "node:inspector"
|
|
16
|
+
import { Session } from "node:inspector";
|
|
17
17
|
|
|
18
18
|
export const startJsCoverage = async ({
|
|
19
19
|
callCount = true,
|
|
20
20
|
detailed = true,
|
|
21
21
|
} = {}) => {
|
|
22
|
-
const session = new Session()
|
|
23
|
-
session.connect()
|
|
22
|
+
const session = new Session();
|
|
23
|
+
session.connect();
|
|
24
24
|
const postSession = (action, options) => {
|
|
25
25
|
const promise = new Promise((resolve, reject) => {
|
|
26
26
|
session.post(action, options, (error, data) => {
|
|
27
27
|
if (error) {
|
|
28
|
-
reject(error)
|
|
28
|
+
reject(error);
|
|
29
29
|
} else {
|
|
30
|
-
resolve(data)
|
|
30
|
+
resolve(data);
|
|
31
31
|
}
|
|
32
|
-
})
|
|
33
|
-
})
|
|
34
|
-
return promise
|
|
35
|
-
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return promise;
|
|
35
|
+
};
|
|
36
36
|
|
|
37
|
-
await postSession("Profiler.enable")
|
|
38
|
-
await postSession("Profiler.startPreciseCoverage", { callCount, detailed })
|
|
37
|
+
await postSession("Profiler.enable");
|
|
38
|
+
await postSession("Profiler.startPreciseCoverage", { callCount, detailed });
|
|
39
39
|
|
|
40
40
|
const takeJsCoverage = async () => {
|
|
41
|
-
const coverage = await postSession("Profiler.takePreciseCoverage")
|
|
42
|
-
return coverage
|
|
43
|
-
}
|
|
41
|
+
const coverage = await postSession("Profiler.takePreciseCoverage");
|
|
42
|
+
return coverage;
|
|
43
|
+
};
|
|
44
44
|
|
|
45
45
|
const stopJsCoverage = async () => {
|
|
46
|
-
const coverage = await takeJsCoverage()
|
|
47
|
-
await postSession("Profiler.stopPreciseCoverage")
|
|
48
|
-
await postSession("Profiler.disable")
|
|
49
|
-
return coverage
|
|
50
|
-
}
|
|
46
|
+
const coverage = await takeJsCoverage();
|
|
47
|
+
await postSession("Profiler.stopPreciseCoverage");
|
|
48
|
+
await postSession("Profiler.disable");
|
|
49
|
+
return coverage;
|
|
50
|
+
};
|
|
51
51
|
|
|
52
52
|
return {
|
|
53
53
|
takeJsCoverage,
|
|
54
54
|
stopJsCoverage,
|
|
55
|
-
}
|
|
56
|
-
}
|
|
55
|
+
};
|
|
56
|
+
};
|