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 { const extensionDevelopmentPath = path.resolve(__dirname, '../../'); const extensionTestsPath = path.resolve(__dirname, './suite/index'); const folder = path.normalize(process.env.SOLUTION_TEST_FOLDER ?? 'D:/Downloads/Nerfed/Nerfed1'); 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); });