Skip to content

Commit b3f9912

Browse files
committed
add check in test for subtest URI
1 parent 83a53e3 commit b3f9912

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/testing/testController/resultResolver.unit.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,12 @@ suite('Result Resolver tests', () => {
344344
resultResolver.runIdToTestItem.set(subtestName, mockSubtestItem);
345345

346346
let generatedId: string | undefined;
347+
let generatedUri: Uri | undefined;
347348
testControllerMock
348-
.setup((t) => t.createTestItem(typemoq.It.isAny(), typemoq.It.isAny()))
349+
.setup((t) => t.createTestItem(typemoq.It.isAny(), typemoq.It.isAny(), typemoq.It.isAny()))
349350
.callback((id: string) => {
350351
generatedId = id;
352+
generatedUri = workspaceUri;
351353
traceLog('createTestItem function called with id:', id);
352354
})
353355
.returns(() => ({ id: 'id_this', label: 'label_this', uri: workspaceUri } as TestItem));
@@ -373,6 +375,7 @@ suite('Result Resolver tests', () => {
373375

374376
// verify that the passed function was called for the single test item
375377
assert.ok(generatedId);
378+
assert.strictEqual(generatedUri, workspaceUri);
376379
assert.strictEqual(generatedId, '[subTest with spaces and [brackets]]');
377380
});
378381
test('resolveExecution handles failed tests correctly', async () => {

0 commit comments

Comments
 (0)