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,11 +1,11 @@
|
||||
// Copyright (c) 2026 Gordon Bolton. MIT License.
|
||||
const {
|
||||
import {
|
||||
initializeClients,
|
||||
getAllDownloads,
|
||||
getDownloadsByClientType,
|
||||
testAllConnections
|
||||
} = require('../../server/utils/downloadClients');
|
||||
const { vi } = require('vitest');
|
||||
} from '../../server/utils/downloadClients.js';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
// Mock environment variables for testing
|
||||
process.env.SABNZBD_INSTANCES = JSON.stringify([
|
||||
|
||||
Reference in New Issue
Block a user