mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
use a true random file name when testing that openTextDocument opens another document, fixes https://github.com/microsoft/vscode/issues/100159
This commit is contained in:
@@ -60,12 +60,12 @@ suite('vscode API - workspace', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('openTextDocument', () => {
|
||||
let len = vscode.workspace.textDocuments.length;
|
||||
return vscode.workspace.openTextDocument(join(vscode.workspace.rootPath || '', './simple.txt')).then(doc => {
|
||||
assert.ok(doc);
|
||||
assert.equal(vscode.workspace.textDocuments.length, len + 1);
|
||||
});
|
||||
test('openTextDocument', async () => {
|
||||
const len = vscode.workspace.textDocuments.length;
|
||||
const uri = await createRandomFile();
|
||||
const doc = await vscode.workspace.openTextDocument(uri);
|
||||
assert.ok(doc);
|
||||
assert.equal(vscode.workspace.textDocuments.length, len + 1);
|
||||
});
|
||||
|
||||
test('openTextDocument, illegal path', () => {
|
||||
|
||||
Reference in New Issue
Block a user