diff options
Diffstat (limited to 'node_modules/jest-pnp-resolver/getDefaultResolver.js')
-rw-r--r-- | node_modules/jest-pnp-resolver/getDefaultResolver.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/node_modules/jest-pnp-resolver/getDefaultResolver.js b/node_modules/jest-pnp-resolver/getDefaultResolver.js new file mode 100644 index 0000000..ab90dbc --- /dev/null +++ b/node_modules/jest-pnp-resolver/getDefaultResolver.js @@ -0,0 +1,13 @@ +let defaultResolver; + +module.exports = () => { + if (!defaultResolver) { + try { + defaultResolver = require(`jest-resolve/build/defaultResolver`).default; + } catch (error) { + defaultResolver = require(`jest-resolve/build/default_resolver`).default; + } + } + + return defaultResolver; +}; |