Files
vs-code-dotnet-solution-lau…/src/test/runTest.ts
T
maxandClaude Fable 5.1 3f67eef9aa Initial version of .NET Solution Launcher
Startup project and solution configuration (Debug|x64, Test|x64, ...) in
the status bar, with build and debug tasks that pass both configuration
and platform. Made for DotRush, whose build never passes -p:Platform and
whose status item shows the configuration but not the project.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
2026-09-08 13:10:55 +02:00

38 lines
1.2 KiB
TypeScript

import * as path from 'path';
import * as fs from 'fs';
import { runTests } from '@vscode/test-electron';
/**
* Launches VS Code on a real solution folder and runs the integration suite.
*
* Other extensions are disabled: DotRush is not needed to select a project and build a
* launch configuration, and without it the run cannot be influenced by its own state.
*/
async function main(): Promise<void> {
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
const extensionTestsPath = path.resolve(__dirname, './suite/index');
const folder = path.normalize(process.env.SOLUTION_TEST_FOLDER ?? 'D:/Projects/MyGame');
if (!fs.existsSync(folder)) {
throw new Error(`Test folder does not exist: ${folder}`);
}
console.log(`[runTest] folder: ${folder}`);
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: [
folder,
'--disable-extensions',
'--disable-workspace-trust',
'--skip-welcome',
'--skip-release-notes',
],
});
}
main().catch(err => {
console.error('Integration tests failed:', err);
process.exit(1);
});