Skip to content

Commit ac9af81

Browse files
committed
Fix tests.
Not really sure why this fixes it but it does.
1 parent a6b4ca6 commit ac9af81

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function activate(context: vscode.ExtensionContext) {
1717
log.info(`Test Explorer ${testExplorerExtension ? '' : 'not '}found`);
1818
}
1919

20-
let testFramework: string = (vscode.workspace.getConfiguration('rubyTestExplorer', null).get('testFramework') as string) || 'none';
20+
let testFramework: string = vscode.workspace.getConfiguration('rubyTestExplorer', null).get('testFramework') || 'none';
2121

2222
if (testExplorerExtension && testFramework !== "none") {
2323
const testHub = testExplorerExtension.exports;

test/runMinitestTests.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import path from 'path';
22
import cp from 'child_process';
33

4-
import { runTests, downloadAndUnzipVSCode, resolveCliPathFromVSCodeExecutablePath } from '@vscode/test-electron';
4+
import { runTests, downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath } from '@vscode/test-electron';
5+
import { testExplorerExtensionId } from 'vscode-test-adapter-api';
56

67
async function main() {
78
try {
89
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
910

10-
const vscodeExecutablePath = await downloadAndUnzipVSCode('stable')
11-
12-
const cliPath = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath)
13-
cp.spawnSync(cliPath, ['--install-extension', 'hbenl.vscode-test-explorer'], {
11+
const vscodeExecutablePath = await downloadAndUnzipVSCode('stable');
12+
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
13+
cp.spawnSync(cli, [...args, '--install-extension', testExplorerExtensionId], {
1414
encoding: 'utf-8',
1515
stdio: 'inherit'
16-
})
16+
});
1717

1818
await runTests(
1919
{

test/runRspecTests.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import path from 'path';
22
import cp from 'child_process';
33

4-
import { runTests, downloadAndUnzipVSCode, resolveCliPathFromVSCodeExecutablePath } from '@vscode/test-electron';
4+
import { runTests, downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath } from '@vscode/test-electron';
5+
import { testExplorerExtensionId } from 'vscode-test-adapter-api';
56

67
async function main() {
78
try {
89
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
910

10-
const vscodeExecutablePath = await downloadAndUnzipVSCode('stable')
11-
12-
const cliPath = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath)
13-
cp.spawnSync(cliPath, ['--install-extension', 'hbenl.vscode-test-explorer'], {
11+
const vscodeExecutablePath = await downloadAndUnzipVSCode('stable');
12+
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
13+
cp.spawnSync(cli, [...args, '--install-extension', testExplorerExtensionId], {
1414
encoding: 'utf-8',
1515
stdio: 'inherit'
16-
})
16+
});
1717

1818
await runTests(
1919
{

0 commit comments

Comments
 (0)