Skip to content

Commit 0af6849

Browse files
Updated commands for test request to get correct value for testRun in netbeans
Added projectTestDebug
1 parent 757022e commit 0af6849

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

vscode/src/commands/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const extCommands = {
3939
projectRun: appendPrefixToCommand('project.run'),
4040
projectDebug: appendPrefixToCommand('project.debug'),
4141
projectTest: appendPrefixToCommand('project.test'),
42+
projectTestDebug: appendPrefixToCommand('project.test.debug'),
4243
packageTest: appendPrefixToCommand('package.test'),
4344
openStackTrace: appendPrefixToCommand('open.stacktrace'),
4445
workspaceSymbols: appendPrefixToCommand('workspace.symbols'),

vscode/src/commands/debug.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const projectDebug = async (node: any, launchConfiguration? : string) => {
4141
const projectTest = async (node: any, launchConfiguration? : string) => {
4242
return runDebug(true, true, getContextUri(node)?.toString() || '', undefined, launchConfiguration, true);
4343
}
44+
const projectTestDebug = async (node: any, launchConfiguration? : string) => {
45+
return runDebug(false, true, getContextUri(node)?.toString() || '', undefined, launchConfiguration, true);
46+
}
4447
const packageTest = async (uri: any, launchConfiguration? : string) => {
4548
await runDebug(true, true, uri, undefined, launchConfiguration);
4649
}
@@ -144,6 +147,9 @@ export const registerDebugCommands: ICommand[] = [
144147
}, {
145148
command: extCommands.projectTest,
146149
handler: projectTest
150+
}, {
151+
command: extCommands.projectTestDebug,
152+
handler: projectTestDebug
147153
}, {
148154
command: extCommands.packageTest,
149155
handler: packageTest

vscode/src/views/TestViewController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ export class NbTestAdapter {
6969
this.set(item, 'enqueued');
7070
const idx = item.id.indexOf(':');
7171
if (!cancellation.isCancellationRequested) {
72-
await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugSingle : extCommands.runSingle, item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1));
72+
await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugTest : extCommands.runTest, item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1));
7373
}
7474
}
7575
}
7676
} else {
7777
this.testController.items.forEach(item => this.set(item, 'enqueued'));
7878
for (let workspaceFolder of workspace.workspaceFolders || []) {
7979
if (!cancellation.isCancellationRequested) {
80-
await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugTest : extCommands.runTest, workspaceFolder.uri.toString());
80+
await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.projectTestDebug : extCommands.projectTest, workspaceFolder.uri.toString());
8181
}
8282
}
8383
}

0 commit comments

Comments
 (0)