Skip to content

Commit bb0dbb3

Browse files
author
Benjamin Pasero
authored
fix vscode.open() tests (microsoft#81833)
1 parent 46043d4 commit bb0dbb3

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ suite('commands namespace tests', () => {
104104
return Promise.all([a, b, c, d, e]);
105105
});
106106

107-
// test('api-command: vscode.open', function () {
108-
// let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/image.png');
109-
// let a = commands.executeCommand('vscode.open', uri).then(() => assert.ok(true), () => assert.ok(false));
110-
// let b = commands.executeCommand('vscode.open', uri, ViewColumn.Two).then(() => assert.ok(true), () => assert.ok(false));
111-
// let c = commands.executeCommand('vscode.open').then(() => assert.ok(false), () => assert.ok(true));
112-
// let d = commands.executeCommand('vscode.open', uri, true).then(() => assert.ok(false), () => assert.ok(true));
113-
114-
// return Promise.all([a, b, c, d]);
115-
// });
107+
test('api-command: vscode.open', function () {
108+
let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/image.png');
109+
let a = commands.executeCommand('vscode.open', uri).then(() => assert.ok(true), () => assert.ok(false));
110+
let b = commands.executeCommand('vscode.open', uri, ViewColumn.Two).then(() => assert.ok(true), () => assert.ok(false));
111+
let c = commands.executeCommand('vscode.open').then(() => assert.ok(false), () => assert.ok(true));
112+
let d = commands.executeCommand('vscode.open', uri, true).then(() => assert.ok(false), () => assert.ok(true));
113+
114+
return Promise.all([a, b, c, d]);
115+
});
116116
});

scripts/test-integration.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
2020
call yarn gulp compile-extension:css-language-features-server
2121
call yarn gulp compile-extension:html-language-features-server
2222
call yarn gulp compile-extension:json-language-features-server
23+
call yarn gulp compile-extension:image-preview
2324

2425
echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
2526
)

scripts/test-integration.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ else
2929
yarn gulp compile-extension:css-language-features-server
3030
yarn gulp compile-extension:html-language-features-server
3131
yarn gulp compile-extension:json-language-features-server
32+
yarn gulp compile-extension:image-preview
3233

3334
echo "Running integration tests with '$INTEGRATION_TEST_ELECTRON_PATH' as build."
3435
fi

0 commit comments

Comments
 (0)