diff --git a/.vscode-test.js b/.vscode-test.js index 23d4a7b..7329146 100644 --- a/.vscode-test.js +++ b/.vscode-test.js @@ -1,3 +1,6 @@ const {defineConfig} = require('@vscode/test-cli'); -module.exports = defineConfig({files: 'out/test/**/*.test.js'}); +module.exports = defineConfig({ + files: 'out/test/**/*.test.js', + workspaceFolder: './sus' +}); diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index 3b7ca7b..98221f8 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -2,9 +2,12 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; //import * as myExtension from '../extension'; -suite('Extension Test Suite', () => { - test('Sample test', () => { - assert.strictEqual(-1, [1, 2, 3].indexOf(5)); - assert.strictEqual(-1, [1, 2, 3].indexOf(0)); +suite('Test Extension', () => { + test('Tests are listed', () => { + // Find the "Testing" activity bar icon and click it: + vscode.commands.executeCommand('workbench.view.extension.test'); + + // Find the "Run All Tests" button and click it: + vscode.commands.executeCommand('workbench.testing.action.runAllTests'); }); });