diff --git a/extensions/typescript-language-features/src/test/onEnter.test.ts b/extensions/typescript-language-features/src/test/onEnter.test.ts index 51378d44bcb..72e59b4482f 100644 --- a/extensions/typescript-language-features/src/test/onEnter.test.ts +++ b/extensions/typescript-language-features/src/test/onEnter.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import 'mocha'; import * as vscode from 'vscode'; -import { CURSOR, withRandomFileEditor, joinLines } from './testUtils'; +import { CURSOR, withRandomFileEditor, wait, joinLines } from './testUtils'; const onDocumentChange = (doc: vscode.TextDocument): Promise => { return new Promise(resolve => { @@ -42,6 +42,8 @@ suite('OnEnter', () => { test('should indent within empty object literal', () => { return withRandomFileEditor(`({${CURSOR}})`, 'js', async (_editor, document) => { await type(document, '\nx'); + await wait(500); + assert.strictEqual( document.getText(), joinLines(`({`, @@ -49,15 +51,4 @@ suite('OnEnter', () => { `})`)); }); }); - - test('should indent after simple jsx tag with attributes', () => { - return withRandomFileEditor(`const a =
${CURSOR}`, 'jsx', async (_editor, document) => { - await type(document, '\nx'); - assert.strictEqual( - document.getText(), - joinLines( - `const a =
`, - ` x`)); - }); - }); });