Skip to content

Commit 1c4ce4d

Browse files
committed
test: exclude TypeScriptSupport LSP extension from test windows
The TypeScriptSupport extension auto-starts a real vtsls language server and registers global providers (hover/QuickView, linting/CodeInspection, hints, jump-to-def) for js/jsx/ts/tsx. In the test runner this polluted pre-existing integration tests that assume nothing else is registered for those languages: - QuickView: a removed JS hover provider still returned a popover (ours). - ESLint: jsx files gained an active inspector, so inspection-disabled was false. - PreferencesManager: real server spawn + doc-sync churn timed the spec out. Strip it in test windows, matching the existing convention for the heavyweight Git extension (excluded for the same reason in ExtensionLoader).
1 parent e437c5b commit 1c4ce4d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/utils/ExtensionLoader.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,16 @@ define(function (require, exports, module) {
166166
// we dont load the heavy weight git extension by default for tests as huge number
167167
// of tests written before git integration and too hard to fix those failing tests for now.
168168
// we will just have new tests from git specific workflows.
169-
const index = DefaultExtensionsList.indexOf("Git");
170-
if(index !== -1) {
171-
DefaultExtensionsList.splice(index, 1);
172-
}
169+
// TypeScriptSupport is excluded for the same reason: it spawns a real vtsls language
170+
// server and registers global providers (hover/QuickView, linting/CodeInspection,
171+
// hints, jump-to-def) for js/jsx/ts/tsx, which breaks pre-existing integration tests
172+
// (e.g. QuickView, ESLint) that assume nothing else is registered for those languages.
173+
["Git", "TypeScriptSupport"].forEach(function (extName) {
174+
const index = DefaultExtensionsList.indexOf(extName);
175+
if(index !== -1) {
176+
DefaultExtensionsList.splice(index, 1);
177+
}
178+
});
173179
}
174180

175181
const customExtensionLoadPaths = {};

0 commit comments

Comments
 (0)