提交 483adec7 编写于 作者: M Matt Bierner

Add simple pinning test for basic completion

上级 df2d0c0f
......@@ -11,13 +11,30 @@ import { disposeAll } from '../utils/dispose';
const testDocumentUri = vscode.Uri.parse('untitled:test.ts');
suite('TypeScript Completions', () => {
const _disposables: vscode.Disposable[] = []
const _disposables: vscode.Disposable[] = [];
teardown(() => {
disposeAll(_disposables);
return vscode.commands.executeCommand('workbench.action.closeAllEditors');
});
test('Basic var completion', async () => {
await wait(100);
await createTestEditor(testDocumentUri,
`const abcdef = 123;`,
`ab$0;`
);
const document = await acceptFirstSuggestion(testDocumentUri, _disposables);
assert.strictEqual(
document.getText(),
joinLines(
`const abcdef = 123;`,
`abcdef;`
));
});
test('Should insert backets when completing dot properties with spaces in name', async () => {
await wait(100);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册