Skip to content

Commit 22290c6

Browse files
author
Philipp Loose
committed
Add test for Tests_Run_Parametrized command
1 parent c0d8399 commit 22290c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/testing/display/picker.unit.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ suite('Unit Tests - Picker (execution of commands)', () => {
2323
const workspaceUri = Uri.file(__filename);
2424

2525
const testFunction = 'some test Function';
26+
const testFunctions = [{
27+
name: 'some_name',
28+
nameToRun: 'some_name_to_run',
29+
time: 0,
30+
resource: workspaceUri
31+
}];
32+
const selection = { type: item.value, fn: { testFunction }, fns: testFunctions };
33+
2634
// Getting the value of CommandSource.commandPalette in getNamesAndValues(CommandSource)
2735
// fails because the names and values object is build by accessing the CommandSource enum
2836
// properties by value. In case of commandpalette the property is commandPalette and the
@@ -47,6 +55,10 @@ suite('Unit Tests - Picker (execution of commands)', () => {
4755
verify(commandManager.executeCommand(Commands.Tests_Run, undefined, commandSource.value, workspaceUri, undefined)).once();
4856
return;
4957
}
58+
case Type.RunParametrized: {
59+
verify(commandManager.executeCommand(Commands.Tests_Run_Parametrized, undefined, commandSource.value, workspaceUri, selection.fns, debug)).once();
60+
return;
61+
}
5062
case Type.ReDiscover: {
5163
verify(commandManager.executeCommand(Commands.Tests_Discover, undefined, commandSource.value, workspaceUri)).once();
5264
return;

0 commit comments

Comments
 (0)