()
| 16 | * Returns code asynchronously for the tslib helper library. |
| 17 | */ |
| 18 | export const getTsLibPath = () => { |
| 19 | // Note: This isn't preferable, but we've no other way to test this bit. Removing the tslib devDep |
| 20 | // during the test run doesn't work due to the nature of the pnpm flat node_modules, and |
| 21 | // other workspace dependencies that depenend upon tslib. |
| 22 | try { |
| 23 | // eslint-disable-next-line no-underscore-dangle |
| 24 | return resolveId(process.env.__TSLIB_TEST_PATH__ || 'tslib/tslib.es6.js', { |
| 25 | // @ts-ignore import.meta.url is allowed because the Rollup plugin injects the correct module format |
| 26 | basedir: fileURLToPath(new URL('.', import.meta.url)) |
| 27 | }); |
| 28 | } catch (_) { |
| 29 | return null; |
| 30 | } |
| 31 | }; |
no test coverage detected