fix: convert test files to ES modules and fix qbittorrent test method calls
Some checks failed
Some checks failed
- Convert all client test files from CommonJS require() to ES module import syntax - Convert downloadClients.test.js and integration/downloadClients.test.js to ES modules - Fix qbittorrent.test.js to use getActiveDownloads() instead of getTorrents() - All test files now use proper Vitest-compatible ES module syntax - Resolves Vitest import errors and QBittorrentClient method call errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2026 Gordon Bolton. MIT License.
|
||||
const {
|
||||
import {
|
||||
DownloadClientRegistry,
|
||||
registry,
|
||||
initializeClients,
|
||||
@@ -10,8 +10,8 @@ const {
|
||||
getDownloadsByClientType,
|
||||
testAllConnections,
|
||||
getAllClientStatuses
|
||||
} = require('../../server/utils/downloadClients');
|
||||
const { vi } = require('vitest');
|
||||
} from '../../server/utils/downloadClients.js';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
// Mock config and clients
|
||||
vi.mock('../../server/utils/config', () => ({
|
||||
|
||||
Reference in New Issue
Block a user