import { workspace } from 'vscode' ; import { TestRunType } from '../testRunner/testRunner' ; param jestArgs param testRunType export function getCliArgsFromJestArgs ( jestArgs , testRunType ) { const cliArgs = [ '--' , ... jestArgs ] ; const usePreviewJavaScriptDebugger = workspace . getConfiguration ( 'debug' ) . get ( 'javascript.usePreview' ) ; if ( testRunType === TestRunType . DEBUG && usePreviewJavaScriptDebugger === false ) { cliArgs . unshift ( '--debug' ) ; } return cliArgs ; }