diff --git a/src/index.js b/src/index.js index 909e395..d8e35c1 100644 --- a/src/index.js +++ b/src/index.js @@ -85,8 +85,9 @@ async function yamlLoader(_, content) { `'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}` ) } + /* c8 ignore stop */ } - return yaml.parse(content); + return yaml.parse(content) } /** @return {import('lilconfig').Options} */ diff --git a/src/req.js b/src/req.js index bd7cb39..41feae5 100644 --- a/src/req.js +++ b/src/req.js @@ -25,19 +25,23 @@ async function req(name, rootFile = __filename) { /* c8 ignore start */ throw err } + /* c8 ignore stop */ } if (tsx === undefined) { try { tsx = await import('tsx/cjs/api') } catch (error) { + /* c8 ignore start */ importError.push(error) } + /* c8 ignore stop */ } if (tsx) { let loaded = tsx.require(name, rootFile) return loaded && '__esModule' in loaded ? loaded.default : loaded + /* c8 ignore start */ } if (jiti === undefined) { @@ -57,6 +61,7 @@ async function req(name, rootFile = __filename) { .map(error => error.message) .join('\n')}` ) + /* c8 ignore stop */ } module.exports = req