Skip to content

Commit 00a9264

Browse files
committed
linting fix
1 parent 2cd8bc7 commit 00a9264

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/test/testing/testController/common/projectTestExecution.unit.test.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
import { TestProjectRegistry } from '../../../../client/testing/testController/common/testProjectRegistry';
3131
import { ITestExecutionAdapter, ITestResultResolver } from '../../../../client/testing/testController/common/types';
3232
import * as telemetry from '../../../../client/telemetry';
33-
import { createDeferred } from '../../../../client/common/utils/async';
3433

3534
suite('Project Test Execution', () => {
3635
let sandbox: sinon.SinonSandbox;
@@ -240,13 +239,13 @@ suite('Project Test Execution', () => {
240239
// ===== groupTestItemsByProject Tests =====
241240

242241
suite('groupTestItemsByProject', () => {
243-
test('should group single test item to its matching project', () => {
242+
test('should group single test item to its matching project', async () => {
244243
// Mock
245244
const item = createMockTestItem('test1', '/workspace/proj/test.py');
246245
const project = createMockProjectAdapter({ projectPath: '/workspace/proj', projectName: 'proj' });
247246

248247
// Run
249-
const result = groupTestItemsByProject([item], [project]);
248+
const result = await groupTestItemsByProject([item], [project]);
250249

251250
// Assert
252251
expect(result.size).to.equal(1);
@@ -255,15 +254,15 @@ suite('Project Test Execution', () => {
255254
expect(entry.items).to.deep.equal([item]);
256255
});
257256

258-
test('should aggregate multiple items belonging to same project', () => {
257+
test('should aggregate multiple items belonging to same project', async () => {
259258
// Mock
260259
const item1 = createMockTestItem('test1', '/workspace/proj/tests/test1.py');
261260
const item2 = createMockTestItem('test2', '/workspace/proj/tests/test2.py');
262261
const item3 = createMockTestItem('test3', '/workspace/proj/test3.py');
263262
const project = createMockProjectAdapter({ projectPath: '/workspace/proj', projectName: 'proj' });
264263

265264
// Run
266-
const result = groupTestItemsByProject([item1, item2, item3], [project]);
265+
const result = await groupTestItemsByProject([item1, item2, item3], [project]);
267266

268267
// Assert - use Set for order-agnostic comparison
269268
expect(result.size).to.equal(1);
@@ -272,7 +271,7 @@ suite('Project Test Execution', () => {
272271
expect(new Set(entry.items)).to.deep.equal(new Set([item1, item2, item3]));
273272
});
274273

275-
test('should separate items into groups by their owning project', () => {
274+
test('should separate items into groups by their owning project', async () => {
276275
// Mock
277276
const item1 = createMockTestItem('test1', '/workspace/proj1/test.py');
278277
const item2 = createMockTestItem('test2', '/workspace/proj2/test.py');
@@ -281,7 +280,7 @@ suite('Project Test Execution', () => {
281280
const proj2 = createMockProjectAdapter({ projectPath: '/workspace/proj2', projectName: 'proj2' });
282281

283282
// Run
284-
const result = groupTestItemsByProject([item1, item2, item3], [proj1, proj2]);
283+
const result = await groupTestItemsByProject([item1, item2, item3], [proj1, proj2]);
285284

286285
// Assert - use Set for order-agnostic comparison
287286
expect(result.size).to.equal(2);
@@ -292,30 +291,30 @@ suite('Project Test Execution', () => {
292291
expect(proj2Entry?.items).to.deep.equal([item2]);
293292
});
294293

295-
test('should return empty map when no test items provided', () => {
294+
test('should return empty map when no test items provided', async () => {
296295
// Mock
297296
const project = createMockProjectAdapter({ projectPath: '/workspace/proj', projectName: 'proj' });
298297

299298
// Run
300-
const result = groupTestItemsByProject([], [project]);
299+
const result = await groupTestItemsByProject([], [project]);
301300

302301
// Assert
303302
expect(result.size).to.equal(0);
304303
});
305304

306-
test('should exclude items that do not match any project path', () => {
305+
test('should exclude items that do not match any project path', async () => {
307306
// Mock
308307
const item = createMockTestItem('test1', '/other/path/test.py');
309308
const project = createMockProjectAdapter({ projectPath: '/workspace/proj', projectName: 'proj' });
310309

311310
// Run
312-
const result = groupTestItemsByProject([item], [project]);
311+
const result = await groupTestItemsByProject([item], [project]);
313312

314313
// Assert
315314
expect(result.size).to.equal(0);
316315
});
317316

318-
test('should assign item to most specific (deepest) project for nested paths', () => {
317+
test('should assign item to most specific (deepest) project for nested paths', async () => {
319318
// Mock
320319
const item = createMockTestItem('test1', '/workspace/parent/child/test.py');
321320
const parentProject = createMockProjectAdapter({ projectPath: '/workspace/parent', projectName: 'parent' });
@@ -325,7 +324,7 @@ suite('Project Test Execution', () => {
325324
});
326325

327326
// Run
328-
const result = groupTestItemsByProject([item], [parentProject, childProject]);
327+
const result = await groupTestItemsByProject([item], [parentProject, childProject]);
329328

330329
// Assert
331330
expect(result.size).to.equal(1);
@@ -334,14 +333,14 @@ suite('Project Test Execution', () => {
334333
expect(entry?.items).to.deep.equal([item]);
335334
});
336335

337-
test('should omit projects that have no matching test items', () => {
336+
test('should omit projects that have no matching test items', async () => {
338337
// Mock
339338
const item = createMockTestItem('test1', '/workspace/proj1/test.py');
340339
const proj1 = createMockProjectAdapter({ projectPath: '/workspace/proj1', projectName: 'proj1' });
341340
const proj2 = createMockProjectAdapter({ projectPath: '/workspace/proj2', projectName: 'proj2' });
342341

343342
// Run
344-
const result = groupTestItemsByProject([item], [proj1, proj2]);
343+
const result = await groupTestItemsByProject([item], [proj1, proj2]);
345344

346345
// Assert
347346
expect(result.size).to.equal(1);

0 commit comments

Comments
 (0)