mirror of
https://github.com/jellyfin/jellyfin-sdk-typescript.git
synced 2024-11-22 21:49:48 +00:00
Merge pull request #266 from thornbill/fix-tests
Fix tests not running due to incompatible versions
This commit is contained in:
commit
1ace33cf29
1767
package-lock.json
generated
1767
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -26,16 +26,16 @@
|
||||
"devDependencies": {
|
||||
"@openapitools/openapi-generator-cli": "2.5.2",
|
||||
"@tsconfig/recommended": "1.0.1",
|
||||
"@types/jest": "27.5.2",
|
||||
"@types/jest": "28.1.8",
|
||||
"@types/node": "18.7.15",
|
||||
"@typescript-eslint/eslint-plugin": "5.36.2",
|
||||
"@typescript-eslint/parser": "5.36.2",
|
||||
"eslint": "8.23.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jest": "27.0.2",
|
||||
"jest": "27.5.1",
|
||||
"jest": "28.1.3",
|
||||
"jest-runner-groups": "2.2.0",
|
||||
"ts-jest": "27.1.5",
|
||||
"ts-jest": "28.0.8",
|
||||
"typedoc": "0.23.14",
|
||||
"typescript": "4.8.2"
|
||||
},
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
import { mocked } from 'ts-jest/utils';
|
||||
|
||||
import { Api, AUTHORIZATION_HEADER } from '..';
|
||||
import { SERVER_URL, TEST_CLIENT, TEST_DEVICE } from '../__helpers__/common';
|
||||
@ -16,7 +15,7 @@ jest.mock('axios', () => ({
|
||||
...jest.requireActual('axios'),
|
||||
request: jest.fn()
|
||||
}));
|
||||
const mockAxios = mocked(axios, true);
|
||||
const mockAxios = jest.mocked(axios, true);
|
||||
|
||||
const TEST_ACCESS_TOKEN = 'TEST-ACCESS-TOKEN';
|
||||
|
||||
|
@ -4,18 +4,16 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { mocked } from 'ts-jest/utils';
|
||||
|
||||
import { DiscoveryService, RecommendedServerDiscovery } from '..';
|
||||
import { Jellyfin, RecommendedServerInfoScore } from '../..';
|
||||
import { TEST_CLIENT, TEST_DEVICE } from '../../__helpers__/common';
|
||||
import { getAddressCandidates } from '../../utils';
|
||||
|
||||
jest.mock('../../utils');
|
||||
const mockGetAddressCandidates = mocked(getAddressCandidates);
|
||||
const mockGetAddressCandidates = jest.mocked(getAddressCandidates);
|
||||
|
||||
jest.mock('../recommended-server-discovery');
|
||||
const mockRecommendedServerDiscovery = mocked(RecommendedServerDiscovery);
|
||||
const mockRecommendedServerDiscovery = jest.mocked(RecommendedServerDiscovery);
|
||||
|
||||
const TEST_URLS = [
|
||||
'https://example.com',
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
import { mocked } from 'ts-jest/utils';
|
||||
|
||||
import { RecommendedServerDiscovery } from '..';
|
||||
import { API_VERSION, Jellyfin, MINIMUM_VERSION, ProductNameIssue, RecommendedServerInfoScore, SlowResponseIssue, SystemInfoIssue, VersionMissingIssue, VersionOutdatedIssue, VersionUnsupportedIssue } from '../..';
|
||||
@ -13,7 +12,7 @@ import { TEST_CLIENT, TEST_DEVICE } from '../../__helpers__/common';
|
||||
import { itIf } from '../../__helpers__/it-if';
|
||||
|
||||
jest.mock('axios');
|
||||
const mockAxios = mocked(axios, true);
|
||||
const mockAxios = jest.mocked(axios, true);
|
||||
|
||||
const ADDRESS = 'https://example.com';
|
||||
const PRODUCT_NAME = 'Jellyfin Server';
|
||||
|
Loading…
Reference in New Issue
Block a user