| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b3352cf commit e12164e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,24 +3,21 @@ const common = require('../common'); | |||
| 3 | 3 | ||
| 4 | 4 | common.skipIfInspectorDisabled(); | |
| 5 | 5 | ||
| 6 | - if (!common.isMainThread) { | ||
| 7 | - common.skip('process.chdir() is not available in workers'); | ||
| 8 | - } | ||
| 9 | - | ||
| 10 | 6 | const fixtures = require('../common/fixtures'); | |
| 11 | 7 | const startCLI = require('../common/inspector-cli'); | |
| 12 | 8 | const tmpdir = require('../common/tmpdir'); | |
| 9 | + const path = require('path'); | ||
| 13 | 10 | ||
| 14 | 11 | tmpdir.refresh(); | |
| 15 | - process.chdir(tmpdir.path); | ||
| 16 | 12 | ||
| 17 | 13 | const { readFileSync } = require('fs'); | |
| 18 | 14 | ||
| 19 | - const filename = 'node.heapsnapshot'; | ||
| 15 | + const filename = path.join(tmpdir.path, 'node.heapsnapshot'); | ||
| 20 | 16 | ||
| 21 | 17 | // Heap profiler take snapshot. | |
| 22 | 18 | { | |
| 23 | - const cli = startCLI([fixtures.path('debugger/empty.js')]); | ||
| 19 | + const opts = { cwd: tmpdir.path }; | ||
| 20 | + const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts); | ||
| 24 | 21 | ||
| 25 | 22 | function onFatal(error) { | |
| 26 | 23 | cli.quit(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments