(appendErrors)
| 16 | * @returns {EXPECTED_ANY} logger object |
| 17 | */ |
| 18 | const createLogger = (appendErrors) => ({ |
| 19 | log: () => {}, |
| 20 | debug: () => {}, |
| 21 | trace: () => {}, |
| 22 | info: () => {}, |
| 23 | // Every infrastructure warning/error must be declared in the example's |
| 24 | // infrastructure-log.js or the build fails, so a filesystem-cache |
| 25 | // store/restore failure can't slip through unnoticed. |
| 26 | warn: (/** @type {string} */ l, /** @type {EXPECTED_ANY[]} */ ...args) => { |
| 27 | appendErrors.push(l); |
| 28 | console.warn(l, ...args); |
| 29 | }, |
| 30 | error: (/** @type {string} */ l, /** @type {EXPECTED_ANY[]} */ ...args) => { |
| 31 | appendErrors.push(l); |
| 32 | console.error(l, ...args); |
| 33 | }, |
| 34 | logTime: () => {}, |
| 35 | group: () => {}, |
| 36 | groupCollapsed: () => {}, |
| 37 | groupEnd: () => {}, |
| 38 | profile: () => {}, |
| 39 | profileEnd: () => {}, |
| 40 | clear: () => {}, |
| 41 | status: () => {} |
| 42 | }); |
| 43 | |
| 44 | const nodeVersion = Number.parseInt(process.version.slice(1).split(".")[0], 10); |
| 45 | // eslint-disable-next-line no-new-func |
no test coverage detected