| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 606523d commit e5251e3
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -529,6 +529,9 @@ NODE_EXTERN std::unique_ptr<InspectorParentHandle> GetInspectorParentHandle( | |||
| 529 | 529 | CHECK_NOT_NULL(env); | |
| 530 | 530 | if (name == nullptr) name = ""; | |
| 531 | 531 | CHECK_NE(thread_id.id, static_cast<uint64_t>(-1)); | |
| 532 | + if (!env->should_create_inspector()) { | ||
| 533 | + return nullptr; | ||
| 534 | + } | ||
| 532 | 535 | #if HAVE_INSPECTOR | |
| 533 | 536 | return std::make_unique<InspectorParentHandleImpl>( | |
| 534 | 537 | env->inspector_agent()->GetParentHandle(thread_id.id, url, name)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -185,3 +185,19 @@ const testFixtures = fixtures.path('test-runner'); | |||
| 185 | 185 | assert.match(stdout, /# tests 1/); | |
| 186 | 186 | assert.match(stdout, /# pass 1/); | |
| 187 | 187 | } | |
| 188 | + | ||
| 189 | + { | ||
| 190 | + // Use test with --loader and --require. | ||
| 191 | + // This case is common since vscode uses --require to load the debugger. | ||
| 192 | + const args = ['--no-warnings', | ||
| 193 | + '--experimental-loader', 'data:text/javascript,', | ||
| 194 | + '--require', fixtures.path('empty.js'), | ||
| 195 | + '--test', join(testFixtures, 'index.test.js')]; | ||
| 196 | + const child = spawnSync(process.execPath, args); | ||
| 197 | + | ||
| 198 | + assert.strictEqual(child.stderr.toString(), ''); | ||
| 199 | + assert.strictEqual(child.status, 0); | ||
| 200 | + assert.strictEqual(child.signal, null); | ||
| 201 | + const stdout = child.stdout.toString(); | ||
| 202 | + assert.match(stdout, /ok 1 - this should pass/); | ||
| 203 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments