(ctx: TestProject, error: any)
| 310 | } |
| 311 | |
| 312 | function serializeError(ctx: TestProject, error: any): TestError[] { |
| 313 | if ('errors' in error && 'pluginCode' in error) { |
| 314 | const errors = error.errors.map((e: any) => { |
| 315 | return { |
| 316 | name: error.name, |
| 317 | message: e.text, |
| 318 | stack: e.location |
| 319 | ? `${error.name}: ${e.text}\n at ${relative(ctx.config.root, e.location.file)}:${e.location.line}:${e.location.column}` |
| 320 | : '', |
| 321 | } |
| 322 | }) |
| 323 | return errors |
| 324 | } |
| 325 | return [ |
| 326 | { |
| 327 | name: error.name, |
| 328 | stack: error.stack, |
| 329 | message: error.message, |
| 330 | }, |
| 331 | ] |
| 332 | } |
| 333 | |
| 334 | function createFileTask( |
| 335 | testFilepath: string, |
no test coverage detected