1515*/
1616
1717import * as vscode from 'vscode' ;
18- import { builtInCommands , extCommands } from "./commands" ;
18+ import { extCommands } from "./commands" ;
1919import { ICommand } from "./types" ;
2020import { extConstants } from '../constants' ;
21- import { getContextUri } from './utils' ;
21+ import { getContextUriFromFile } from './utils' ;
2222
2323const runTest = async ( uri : any , methodName ? : string , launchConfiguration ?: string ) => {
2424 await runDebug ( true , true , uri , methodName , launchConfiguration ) ;
@@ -33,23 +33,23 @@ const debugSingle = async (uri: any, methodName? : string, launchConfiguration?:
3333 await runDebug ( false , false , uri , methodName , launchConfiguration ) ;
3434}
3535const projectRun = async ( node : any , launchConfiguration ? : string ) => {
36- return runDebug ( true , false , getContextUri ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
36+ return runDebug ( true , false , getContextUriFromFile ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
3737}
3838const projectDebug = async ( node : any , launchConfiguration ? : string ) => {
39- return runDebug ( false , false , getContextUri ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
39+ return runDebug ( false , false , getContextUriFromFile ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
4040}
4141const projectTest = async ( node : any , launchConfiguration ? : string ) => {
42- return runDebug ( true , true , getContextUri ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
42+ return runDebug ( true , true , getContextUriFromFile ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
4343}
4444const projectTestDebug = async ( node : any , launchConfiguration ? : string ) => {
45- return runDebug ( false , true , getContextUri ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
45+ return runDebug ( false , true , getContextUriFromFile ( node ) ?. toString ( ) || '' , undefined , launchConfiguration , true ) ;
4646}
4747const packageTest = async ( uri : any , launchConfiguration ? : string ) => {
4848 await runDebug ( true , true , uri , undefined , launchConfiguration ) ;
4949}
5050
5151const runDebug = async ( noDebug : boolean , testRun : boolean , uri : any , methodName ?: string , launchConfiguration ?: string , project : boolean = false , ) => {
52- const docUri = getContextUri ( uri ) ;
52+ const docUri = getContextUriFromFile ( uri ) ;
5353 if ( docUri ) {
5454 let debugConfig : vscode . DebugConfiguration = {
5555 type : extConstants . COMMAND_PREFIX ,
0 commit comments