test: remove usesless filter calls

This commit is contained in:
WebStreamr 2025-06-09 20:23:03 +00:00
parent 8382c009f4
commit bc9c41f005
No known key found for this signature in database
10 changed files with 22 additions and 22 deletions

View file

@ -23,20 +23,20 @@ describe('CineHDPlus', () => {
});
test('handle imdb black mirror s2e3 (mx)', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 3))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 3));
expect(streams).toMatchSnapshot();
});
test('handle imdb babylon 5 s2e3 (es)', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt0105946', 2, 3))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt0105946', 2, 3));
expect(streams).toMatchSnapshot();
});
test('does not return mx results for es and vice-versa', async () => {
const streamsEs = (await handler.handle({ ...ctx, ...{ config: { es: 'on' } } }, 'series', new ImdbId('tt2085059', 2, 3))).filter(stream => stream !== undefined);
const streamsEs = await handler.handle({ ...ctx, ...{ config: { es: 'on' } } }, 'series', new ImdbId('tt2085059', 2, 3));
expect(streamsEs).toHaveLength(0);
const streamsMx = (await handler.handle({ ...ctx, ...{ config: { mx: 'on' } } }, 'series', new ImdbId('tt0105946', 2, 3))).filter(stream => stream !== undefined);
const streamsMx = await handler.handle({ ...ctx, ...{ config: { mx: 'on' } } }, 'series', new ImdbId('tt0105946', 2, 3));
expect(streamsMx).toHaveLength(0);
});
});

View file

@ -23,7 +23,7 @@ describe('Eurostreaming', () => {
});
test('handle imdb black mirror s2e4', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 4))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 4));
expect(streams).toMatchSnapshot();
});
});

View file

@ -18,12 +18,12 @@ describe('Frembed', () => {
});
test('handle imdb black mirror s4e2', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 4, 2))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 4, 2));
expect(streams).toMatchSnapshot();
});
test('handle tmdb black mirror s4e2', async () => {
const streams = (await handler.handle(ctx, 'series', new TmdbId(42009, 4, 2))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new TmdbId(42009, 4, 2));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,7 +23,7 @@ describe('FrenchCloud', () => {
});
test('handle imdb the devil\'s bath', async () => {
const streams = (await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,27 +23,27 @@ describe('KinoGer', () => {
});
test('handle non-existent episode gracefully', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 99, 99))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 99, 99));
expect(streams).toHaveLength(0);
});
test('handle imdb dead city s2e6', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt18546730', 2, 6))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt18546730', 2, 6));
expect(streams).toMatchSnapshot();
});
test('handle missing episode imdb black mirror s3e4', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 3, 4))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 3, 4));
expect(streams).toMatchSnapshot();
});
test('handle no fsst via brokeback mountain', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt0388795', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt0388795', undefined, undefined));
expect(streams).toMatchSnapshot();
});
test('handle imdb blood and sinners', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt31193180', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt31193180', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,7 +23,7 @@ describe('MeineCloud', () => {
});
test('handle imdb the devil\'s bath', async () => {
const streams = (await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,7 +23,7 @@ describe('MostraGuarda', () => {
});
test('handle imdb the devil\'s bath', async () => {
const streams = (await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt29141112', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,27 +23,27 @@ describe('Soaper', () => {
});
test('handle non-uploaded movie gracefully', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt29141112', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt29141112', undefined, undefined));
expect(streams).toHaveLength(0);
});
test('handle non-existent episode gracefully', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 99, 99))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 99, 99));
expect(streams).toHaveLength(0);
});
test('handle imdb black mirror s4e2', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 4, 2))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 4, 2));
expect(streams).toMatchSnapshot();
});
test('handle tmdb black mirror s4e2', async () => {
const streams = (await handler.handle(ctx, 'series', new TmdbId(42009, 4, 2))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new TmdbId(42009, 4, 2));
expect(streams).toMatchSnapshot();
});
test('handle imdb full metal jacket', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt0093058', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt0093058', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,7 +23,7 @@ describe('StreamKiste', () => {
});
test('handle imdb black mirror s2e4', async () => {
const streams = (await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 4))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'series', new ImdbId('tt2085059', 2, 4));
expect(streams).toMatchSnapshot();
});
});

View file

@ -23,7 +23,7 @@ describe('VerHdLink', () => {
});
test('handle titanic', async () => {
const streams = (await handler.handle(ctx, 'movie', new ImdbId('tt0120338', undefined, undefined))).filter(stream => stream !== undefined);
const streams = await handler.handle(ctx, 'movie', new ImdbId('tt0120338', undefined, undefined));
expect(streams).toMatchSnapshot();
});
});