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,7 +1,7 @@
|
||||
// Copyright (c) 2026 Gordon Bolton. MIT License.
|
||||
const RTorrentClient = require('../../../server/clients/RTorrentClient');
|
||||
const xmlrpc = require('xmlrpc');
|
||||
const { vi } = require('vitest');
|
||||
import RTorrentClient from '../../../server/clients/RTorrentClient.js';
|
||||
import xmlrpc from 'xmlrpc';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
vi.mock('xmlrpc', () => ({
|
||||
createClient: vi.fn()
|
||||
|
||||
Reference in New Issue
Block a user