|
1 | 1 | import { AssertionError, deepStrictEqual } from "assert"; |
2 | 2 | import { url } from "inspector"; |
3 | | -import { isNil, newLogger } from "@compas/stdlib"; |
| 3 | +import { AppError, isNil, newLogger } from "@compas/stdlib"; |
4 | 4 | import { markTestFailuresRecursively } from "./printer.js"; |
5 | 5 | import { setTestTimeout, state, testLogger, timeout } from "./state.js"; |
6 | 6 |
|
@@ -138,6 +138,7 @@ function createRunnerForState(testState, abortSignal) { |
138 | 138 | }, |
139 | 139 | }), |
140 | 140 | signal: abortSignal, |
| 141 | + name: testState.name, |
141 | 142 | ok: ok.bind(undefined, testState), |
142 | 143 | notOk: notOk.bind(undefined, testState), |
143 | 144 | equal: equal.bind(undefined, testState), |
@@ -170,9 +171,10 @@ function mutateRunnerEnablingWarnings(runner) { |
170 | 171 | const implementation = runner[method]; |
171 | 172 |
|
172 | 173 | runner[method] = (...args) => { |
173 | | - runner.log.error( |
174 | | - `warning: called 't.${method}' on parent 't'. Accept 't' as argument in the callback of 't.test(msg, callback)'.`, |
175 | | - ); |
| 174 | + runner.log.error({ |
| 175 | + message: `warning: called 't.${method}' on parent 't'. Accept 't' as argument in the callback of 't.test(msg, callback)'.`, |
| 176 | + stackTrace: AppError.format(AppError.serverError({})), |
| 177 | + }); |
176 | 178 |
|
177 | 179 | implementation(...args); |
178 | 180 | }; |
|
0 commit comments