Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Molinaro authored Aug 14, 2021
1 parent 807c48c commit 9a44fa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/jest-resolve/src/defaultResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ function statSyncCached(path: string): IPathType {
let stat;
const oldTrace = Object.getOwnPropertyDescriptors(Error).stackTraceLimit;
try {
if(oldTrace.writable) {
Object.defineProperty(Error, 'stackTraceLimit', {
value: 0,
writable: false,
});
}
stat = fs.statSync(path);
} catch (e) {
if (!(e && (e.code === 'ENOENT' || e.code === 'ENOTDIR'))) {
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-resolve/src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ export default class Resolver {
rootDir: options.rootDir,
});
} catch (e) {
console.log(e)
throw e
if (options.throwIfNotFound) {
throw e;
}
Expand Down

0 comments on commit 9a44fa4

Please sign in to comment.