From b567ea7e8d23ee4b45a9723503ec20be48b3a874 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 15 Dec 2021 15:30:07 +0100 Subject: [PATCH] tests - do not add file to our workspace --- .../src/singlefolder-tests/commands.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts index 48abda37adb..d7ad4713558 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import 'mocha'; import { join } from 'path'; import { commands, Position, Range, Uri, ViewColumn, window, workspace } from 'vscode'; -import { assertNoRpc } from '../utils'; +import { assertNoRpc, closeAllEditors } from '../utils'; suite('vscode API - commands', () => { @@ -118,10 +118,12 @@ suite('vscode API - commands', () => { }); test('api-command: vscode.open with untitled supports associated resource (#138925)', async function () { - let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/far-copy.js').with({ scheme: 'untitled' }); + let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/untitled-file.txt').with({ scheme: 'untitled' }); await commands.executeCommand('vscode.open', uri).then(() => assert.ok(true), () => assert.ok(false)); // untitled with associated resource are dirty from the beginning assert.ok(window.activeTextEditor?.document.isDirty); + + return closeAllEditors(); }); });