(exception)
| 4 | // async function for some bizarre reason, so the async function is wrapped in a non-async function. |
| 5 | $(() => (async () => { |
| 6 | const stringifyException = (exception) => { |
| 7 | let err = exception.stack || exception.toString(); |
| 8 | |
| 9 | // FF / Opera do not add the message |
| 10 | if (!~err.indexOf(exception.message)) { |
| 11 | err = `${exception.message}\n${err}`; |
| 12 | } |
| 13 | |
| 14 | // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we |
| 15 | // check for the result of the stringifying. |
| 16 | if (err === '[object Error]') err = exception.message; |
| 17 | |
| 18 | // Safari doesn't give you a stack. Let's at least provide a source line. |
| 19 | if (!exception.stack && exception.sourceURL && exception.line !== undefined) { |
| 20 | err += `\n(${exception.sourceURL}:${exception.line})`; |
| 21 | } |
| 22 | |
| 23 | return err; |
| 24 | }; |
| 25 | |
| 26 | const customRunner = (runner) => { |
| 27 | const stats = {suites: 0, tests: 0, passes: 0, pending: 0, failures: 0}; |
no test coverage detected