mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
type-imports and importAMDNodeModule for xterm/terminal
This commit is contained in:
parent
21d269efec
commit
dc95a83da9
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { importAMDNodeModule } from 'vs/amdX';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
|
@ -49,7 +50,7 @@ suite('Buffer Content Tracker', () => {
|
|||
let bufferTracker: BufferContentTracker;
|
||||
const prompt = 'vscode-git:(prompt/more-tests)';
|
||||
const promptPlusData = 'vscode-git:(prompt/more-tests) ' + 'some data';
|
||||
setup(() => {
|
||||
setup(async () => {
|
||||
configurationService = new TestConfigurationService({ terminal: { integrated: defaultTerminalConfig } });
|
||||
instantiationService = new TestInstantiationService();
|
||||
themeService = new TestThemeService();
|
||||
|
@ -66,7 +67,8 @@ suite('Buffer Content Tracker', () => {
|
|||
if (!isWindows) {
|
||||
capabilities.add(TerminalCapability.NaiveCwdDetection, null!);
|
||||
}
|
||||
xterm = instantiationService.createInstance(XtermTerminal, Terminal, configHelper, 80, 30, { getBackgroundColor: () => undefined }, capabilities, '', new MockContextKeyService().createKey('', true)!, true);
|
||||
const TerminalCtor = (await importAMDNodeModule<typeof import('xterm')>('xterm', 'lib/xterm.js')).Terminal;
|
||||
xterm = instantiationService.createInstance(XtermTerminal, TerminalCtor, configHelper, 80, 30, { getBackgroundColor: () => undefined }, capabilities, '', new MockContextKeyService().createKey('', true)!, true);
|
||||
const container = document.createElement('div');
|
||||
xterm.raw.open(container);
|
||||
configurationService = new TestConfigurationService({ terminal: { integrated: { tabs: { separator: ' - ', title: '${cwd}', description: '${cwd}' } } } });
|
||||
|
|
|
@ -29,6 +29,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
|
|||
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
|
||||
import { ITerminalQuickFixService } from 'vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix';
|
||||
import { ITerminalOutputMatcher } from 'vs/platform/terminal/common/terminal';
|
||||
import { importAMDNodeModule } from 'vs/amdX';
|
||||
|
||||
suite('QuickFixAddon', () => {
|
||||
let quickFixAddon: TerminalQuickFixAddon;
|
||||
|
@ -37,9 +38,10 @@ suite('QuickFixAddon', () => {
|
|||
let openerService: OpenerService;
|
||||
let labelService: LabelService;
|
||||
let terminal: Terminal;
|
||||
setup(() => {
|
||||
setup(async () => {
|
||||
const instantiationService = new TestInstantiationService();
|
||||
terminal = new Terminal({
|
||||
const TerminalCtor = (await importAMDNodeModule<typeof import('xterm')>('xterm', 'lib/xterm.js')).Terminal;
|
||||
terminal = new TerminalCtor({
|
||||
allowProposedApi: true,
|
||||
cols: 80,
|
||||
rows: 30
|
||||
|
|
Loading…
Reference in a new issue