import * as path from 'path' ; import { runTests } from 'vscode-test' ; async function main ( ) { try { const repoRoot = path . resolve ( __dirname , '..' , '..' ) ; await runTests ( { extensionDevelopmentPath : repoRoot , launchArgs : [ path . resolve ( repoRoot , 'test' , 'test.code-workspace' ) , '--disable-workspace-trust' ] , extensionTestsPath : path . resolve ( repoRoot , 'dist' , 'test' , 'index' ) , extensionTestsEnv : { DEBUGTELEMETRY : 'v' , MOCHA_timeout : '20000' } } ) ; } catch ( err ) { console . error ( 'Failed to run tests' ) ; process . exit ( 1 ) ; } } void main ( ) ;