webstreamr-github/src/source/MeineCloud.test.ts
2025-07-02 09:28:10 +00:00

23 lines
775 B
TypeScript

import { createTestContext } from '../test';
import { FetcherMock, ImdbId } from '../utils';
import { MeineCloud } from './MeineCloud';
const ctx = createTestContext({ de: 'on' });
describe('MeineCloud', () => {
let handler: MeineCloud;
beforeEach(() => {
handler = new MeineCloud(new FetcherMock(`${__dirname}/__fixtures__/MeineCloud`));
});
test('handles non-existent movies gracefully', async () => {
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt12345678', undefined, undefined));
expect(streams).toHaveLength(0);
});
test('handle imdb the devil\'s bath', async () => {
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});