don't check for number of documents, https://github.com/microsoft/vscode/issues/100842
This commit is contained in:
parent
e5d08ae4bc
commit
ef9a24f021
|
@ -61,11 +61,18 @@ suite('vscode API - workspace', () => {
|
|||
});
|
||||
|
||||
test('openTextDocument', async () => {
|
||||
const len = vscode.workspace.textDocuments.length;
|
||||
const uri = await createRandomFile();
|
||||
|
||||
// not yet there
|
||||
const existing1 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
|
||||
assert.equal(existing1, undefined);
|
||||
|
||||
// open and assert its there
|
||||
const doc = await vscode.workspace.openTextDocument(uri);
|
||||
assert.ok(doc);
|
||||
assert.equal(vscode.workspace.textDocuments.length, len + 1);
|
||||
assert.equal(doc.uri.toString(), uri.toString());
|
||||
const existing2 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
|
||||
assert.equal(existing2 === doc, true);
|
||||
});
|
||||
|
||||
test('openTextDocument, illegal path', () => {
|
||||
|
|
Loading…
Reference in a new issue