Skip to content

Commit dfa4d67

Browse files
author
jack
committed
test(telegram): sort imports in channel regression test
1 parent ba4a3b1 commit dfa4d67

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

lib/routes/telegram/tglib/channel.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
import { describe, expect, it } from 'vitest';
21
import { Api } from 'telegram';
2+
import { describe, expect, it } from 'vitest';
33

44
import { getMediaLink, getMessageMediaUrl, withSearchParams } from './channel';
55

66
describe('telegram tglib channel', () => {
77
it('preserves access auth params in telegram media urls', () => {
88
expect(getMessageMediaUrl('https://rsshub.app/telegram/channel/test?key=secret', 'test', 123)).toBe('https://rsshub.app/telegram/media/test/123?key=secret');
99
expect(getMessageMediaUrl('https://rsshub.app/telegram/channel/test?code=signed', 'test', 123)).toBe('https://rsshub.app/telegram/media/test/123?code=signed');
10-
expect(getMessageMediaUrl('https://rsshub.app/telegram/channel/test?key=secret&code=signed', 'test', 123)).toBe(
11-
'https://rsshub.app/telegram/media/test/123?key=secret&code=signed'
12-
);
10+
expect(getMessageMediaUrl('https://rsshub.app/telegram/channel/test?key=secret&code=signed', 'test', 123)).toBe('https://rsshub.app/telegram/media/test/123?key=secret&code=signed');
1311
});
1412

1513
it('appends thumb without dropping existing query params', () => {
16-
expect(withSearchParams('https://rsshub.app/telegram/media/test/123?key=secret', { thumb: '' })).toBe(
17-
'https://rsshub.app/telegram/media/test/123?key=secret&thumb='
18-
);
14+
expect(withSearchParams('https://rsshub.app/telegram/media/test/123?key=secret', { thumb: '' })).toBe('https://rsshub.app/telegram/media/test/123?key=secret&thumb=');
1915
});
2016

2117
it('renders video poster urls with preserved auth params', () => {

0 commit comments

Comments
 (0)