import * as path from 'path' ; import * as cp from 'child_process' ; import { runTests , downloadAndUnzipVSCode , resolveCliPathFromVSCodeExecutablePath } from 'vscode-test' ; async function main ( ) { try { const executable = await downloadAndUnzipVSCode ( ) ; const cliPath = resolveCliPathFromVSCodeExecutablePath ( executable ) ; const dependencies = [ ] ; for ( const dep of dependencies ) { const installLog = cp . execSync ( `"${ cliPath }" --install-extension ${ dep }` ) ; console . log ( installLog . toString ( ) ) ; } const extensionDevelopmentPath = path . resolve ( __dirname , '../../' ) ; const extensionTestsPath = path . resolve ( __dirname , './index' ) ; await runTests ( { vscodeExecutablePath : executable , extensionDevelopmentPath , extensionTestsPath , launchArgs : [ '--disable-extension=ms-kubernetes-tools.vscode-kubernetes-tools' , '.' ] , } ) ; } catch ( err ) { console . error ( 'Failed to run tests' ) ; process . exit ( 1 ) ; } } main ( ) ;