import * as path from "path" ; import { runTests } from "vscode-test" ; async function launchTests ( ) { try { const extensionDevelopmentPath = path . resolve ( __dirname , ".." ) ; const extensionTestsPath = path . resolve ( __dirname , "index" ) ; const testWorkspace = path . resolve ( __dirname , "resources" , "testCordovaProject" ) ; await runTests ( { extensionDevelopmentPath , extensionTestsPath , launchArgs : [ testWorkspace ] , version : "1.53.2" } ) ; } catch ( err ) { console . error ( err ) ; console . error ( "Failed to run tests" ) ; process . exit ( 1 ) ; } } launchTests ( ) ;