(appendTarget, appendErrors)
| 50 | * @returns {EXPECTED_ANY} logger object |
| 51 | */ |
| 52 | const createLogger = (appendTarget, appendErrors) => ({ |
| 53 | log: (/** @type {string} */ l) => appendTarget.push(l), |
| 54 | debug: (/** @type {string} */ l) => appendTarget.push(l), |
| 55 | trace: (/** @type {string} */ l) => appendTarget.push(l), |
| 56 | info: (/** @type {string} */ l) => appendTarget.push(l), |
| 57 | class="cm">// Collect warn/error separately: every infrastructure warning/error must be |
| 58 | class="cm">// declared in the case's infrastructure-log.js or the test fails, so a cache |
| 59 | class="cm">// store/restore failure can't slip through unnoticed. |
| 60 | warn: (/** @type {string} */ l, /** @type {EXPECTED_ANY[]} */ ...args) => { |
| 61 | appendErrors.push(l); |
| 62 | console.warn(l, ...args); |
| 63 | }, |
| 64 | error: (/** @type {string} */ l, /** @type {EXPECTED_ANY[]} */ ...args) => { |
| 65 | appendErrors.push(l); |
| 66 | console.error(l, ...args); |
| 67 | }, |
| 68 | logTime: () => {}, |
| 69 | group: () => {}, |
| 70 | groupCollapsed: () => {}, |
| 71 | groupEnd: () => {}, |
| 72 | profile: () => {}, |
| 73 | profileEnd: () => {}, |
| 74 | clear: () => {}, |
| 75 | status: () => {} |
| 76 | }); |
| 77 | |
| 78 | /** |
| 79 | * @param {SuiteConfig} config suite config |
no test coverage detected