frida-test 0.3.1 → 0.3.2
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/package.json +1 -1
- package/src/agent-runtime/registry.ts +19 -25
package/package.json
CHANGED
|
@@ -252,35 +252,29 @@ export async function runTests(nodes: TestSuiteNode[], emit: (message: AgentMess
|
|
|
252
252
|
|
|
253
253
|
const parentHooks: EachHooks = { beforeEach: rootHooks.beforeEach, afterEach: rootHooks.afterEach };
|
|
254
254
|
|
|
255
|
-
const settled = await Promise.allSettled(
|
|
256
|
-
nodes.map(async (node) => {
|
|
257
|
-
emit({ type: "test-suite-started", name: node.name });
|
|
258
|
-
const { result: testResult, counts } = await runTestSuiteNode(node, verbose, parentHooks);
|
|
259
|
-
const suiteResult: TestSuiteResult = { name: node.name, testResult, status: testResult.status };
|
|
260
|
-
emit({ type: "test-suite-finished", name: node.name, result: suiteResult });
|
|
261
|
-
return { suiteResult, counts };
|
|
262
|
-
}),
|
|
263
|
-
);
|
|
264
|
-
|
|
265
255
|
const testSuitesResults: TestSuiteResult[] = [];
|
|
266
256
|
let counts = ZERO_COUNTS;
|
|
267
257
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
counts =
|
|
272
|
-
|
|
258
|
+
for (const node of nodes) {
|
|
259
|
+
emit({ type: "test-suite-started", name: node.name });
|
|
260
|
+
try {
|
|
261
|
+
const { result: testResult, counts: nodeCounts } = await runTestSuiteNode(node, verbose, parentHooks);
|
|
262
|
+
const suiteResult: TestSuiteResult = { name: node.name, testResult, status: testResult.status };
|
|
263
|
+
emit({ type: "test-suite-finished", name: node.name, result: suiteResult });
|
|
264
|
+
testSuitesResults.push(suiteResult);
|
|
265
|
+
counts = addCounts(counts, nodeCounts);
|
|
266
|
+
} catch (err) {
|
|
267
|
+
const error = serializeError(err, verbose);
|
|
268
|
+
const suiteResult: TestSuiteResult = {
|
|
269
|
+
name: node.name,
|
|
270
|
+
testResult: { name: node.name, status: "failed", durationMs: 0, error },
|
|
271
|
+
status: "failed",
|
|
272
|
+
};
|
|
273
|
+
emit({ type: "test-suite-finished", name: node.name, result: suiteResult });
|
|
274
|
+
testSuitesResults.push(suiteResult);
|
|
275
|
+
counts = addCounts(counts, { total: 1, passed: 0, failed: 1 });
|
|
273
276
|
}
|
|
274
|
-
|
|
275
|
-
const error = serializeError(outcome.reason, verbose);
|
|
276
|
-
const testSuiteResult: TestSuiteResult = {
|
|
277
|
-
name: nodes[i].name,
|
|
278
|
-
testResult: { name: nodes[i].name, status: "failed", durationMs: 0, error },
|
|
279
|
-
status: "failed",
|
|
280
|
-
};
|
|
281
|
-
testSuitesResults.push(testSuiteResult);
|
|
282
|
-
counts = addCounts(counts, { total: 1, passed: 0, failed: 1 });
|
|
283
|
-
});
|
|
277
|
+
}
|
|
284
278
|
|
|
285
279
|
const afterAllError = await runTeardownHooks(rootHooks.afterAll, verbose);
|
|
286
280
|
if (afterAllError) {
|