Skip to content

Commit

Permalink
Merge pull request #188 from thornbill/fix-integration-tests
Browse files Browse the repository at this point in the history
Fix integration tests
  • Loading branch information
thornbill authored Jun 17, 2022
2 parents 326112e + 3b0dd77 commit 399d027
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/__tests__/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

import { Jellyfin, RecommendedServerInfoScore } from '..';
import { TEST_CLIENT, TEST_DEVICE } from '../__helpers__/common';
import { getLibraryApi } from '../utils/api/library-api';
import { getSystemApi } from '../utils/api/system-api';
import { getUserApi } from '../utils/api/user-api';

const SERVER_URL = 'https://demo.jellyfin.org/stable';

Expand Down Expand Up @@ -36,7 +39,7 @@ describe('Test the Base SDK', () => {
});
const api = jellyfin.createApi(SERVER_URL);

const users = await api.userApi.getPublicUsers();
const users = await getUserApi(api).getPublicUsers();
// console.log('Users =>', users.data);
expect(users.data).toBeTruthy();
});
Expand All @@ -48,7 +51,7 @@ describe('Test the Base SDK', () => {
});
const api = jellyfin.createApi(SERVER_URL);

const info = await api.systemApi.getPublicSystemInfo();
const info = await getSystemApi(api).getPublicSystemInfo();
// console.log('Info =>', info.data);
expect(info.data).toBeTruthy();
});
Expand Down Expand Up @@ -76,7 +79,7 @@ describe('Test the Base SDK', () => {

await api.authenticateUserByName('demo');

const libraries = await api.libraryApi.getMediaFolders();
const libraries = await getLibraryApi(api).getMediaFolders();
// console.log('Libraries =>', libraries.data);
expect(libraries.data).toBeTruthy();

Expand Down

0 comments on commit 399d027

Please sign in to comment.