| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e1cba97 commit 9c76c95
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,13 +58,17 @@ describe('process.loadEnvFile()', () => { | |||
| 58 | 58 | const originalCwd = process.cwd(); | |
| 59 | 59 | ||
| 60 | 60 | try { | |
| 61 | - process.chdir(join(originalCwd, 'lib')); | ||
| 61 | + if (common.isMainThread) { | ||
| 62 | + process.chdir(join(originalCwd, 'lib')); | ||
| 63 | + } | ||
| 62 | 64 | ||
| 63 | 65 | assert.throws(() => { | |
| 64 | 66 | process.loadEnvFile(); | |
| 65 | 67 | }, { code: 'ENOENT', syscall: 'open', path: '.env' }); | |
| 66 | 68 | } finally { | |
| 67 | - process.chdir(originalCwd); | ||
| 69 | + if (common.isMainThread) { | ||
| 70 | + process.chdir(originalCwd); | ||
| 71 | + } | ||
| 68 | 72 | } | |
| 69 | 73 | }); | |
| 70 | 74 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments