diff --git a/packages/vscode-wdio-server/tests/worker.test.ts b/packages/vscode-wdio-server/tests/worker.test.ts index f92780c..8d65c81 100644 --- a/packages/vscode-wdio-server/tests/worker.test.ts +++ b/packages/vscode-wdio-server/tests/worker.test.ts @@ -63,7 +63,7 @@ describe('WdioExtensionWorker', () => { exitCode: null, killed: false, } - vi.mocked(childProcess.spawn).mockReturnValue(mockChildProcess as any) + vi.mocked(childProcess.spawn).mockReturnValue(mockChildProcess) // Setup HTTP server mock mockServer = { @@ -71,7 +71,7 @@ describe('WdioExtensionWorker', () => { unref: vi.fn(), close: vi.fn().mockImplementation((cb) => cb && cb(null)), } - vi.mocked(http.createServer).mockReturnValue(mockServer as any) + vi.mocked(http.createServer).mockReturnValue(mockServer) // Setup WebSocketServer mock mockWs = new EventEmitter() diff --git a/packages/vscode-wdio-test/tests/reporter.test.ts b/packages/vscode-wdio-test/tests/reporter.test.ts index b918730..f3efe6d 100644 --- a/packages/vscode-wdio-test/tests/reporter.test.ts +++ b/packages/vscode-wdio-test/tests/reporter.test.ts @@ -120,7 +120,7 @@ describe('TestReporter', () => { it('should return true when all tests passed', () => { // Setup const specPath = '/path/to/spec.js' - const specTestItem = createMockTestItem(specPath, 'spec.js') as vscode.TestItem + const specTestItem = createMockTestItem(specPath, 'spec.js') const mockSuite = createMockTestSuite('Test Suite') const mockResult = createMockResultSet([specPath], [mockSuite], { passed: 2, failed: 0, skipped: 0 }) @@ -138,7 +138,7 @@ describe('TestReporter', () => { it('should return false when any test failed', () => { // Setup const specPath = '/path/to/spec.js' - const specTestItem = createMockTestItem(specPath, 'spec.js') as vscode.TestItem + const specTestItem = createMockTestItem(specPath, 'spec.js') const mockSuite = createMockTestSuite('Test Suite') const mockResult = createMockResultSet([specPath], [mockSuite], { passed: 1, failed: 1, skipped: 0 })