From f0e9699b14fc4b80b49f71e8a68df7a38167c5f0 Mon Sep 17 00:00:00 2001 From: Raghu Saxena Date: Wed, 25 Dec 2024 16:34:50 +0530 Subject: [PATCH] Fix version, tests --- __tests__/qbittorrent/auth.test.ts | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/__tests__/qbittorrent/auth.test.ts b/__tests__/qbittorrent/auth.test.ts index 5aa21d6..14dd74f 100644 --- a/__tests__/qbittorrent/auth.test.ts +++ b/__tests__/qbittorrent/auth.test.ts @@ -12,13 +12,16 @@ test('loginV2', async t => { password: 'adminadmin' } - const scope = nock(fakeSettings.url).post('/api/v2/auth/login', { + const scope = nock(fakeSettings.url); + + scope.post('/api/v2/auth/login', { username: 'admin', password: 'adminadmin' }).reply(200, {}, { 'set-cookie': 'SID=1234' }); - + + scope.get('/api/v2/app/version').reply(200, 'v4'); const api = await loginV2(fakeSettings); //@ts-ignore - client is private but we want to access for testing diff --git a/package.json b/package.json index 13eb988..53caa37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qbit-race", - "version": "2.0.0-alpha.18", + "version": "2.0.0-alpha.19", "description": "Qbit utilities for racing", "main": "./bin/index.js", "type": "module",