]>
Commit | Line | Data |
---|---|---|
764a9657 C |
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | ||
3 | import 'mocha' | |
4 | import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils' | |
5 | import { getVideosOverview } from '@shared/extra-utils/overviews/overviews' | |
6 | ||
7 | describe('Test videos overview', function () { | |
8 | let server: ServerInfo | |
9 | ||
10 | // --------------------------------------------------------------- | |
11 | ||
12 | before(async function () { | |
13 | this.timeout(30000) | |
14 | ||
15 | server = await flushAndRunServer(1) | |
16 | }) | |
17 | ||
18 | describe('When getting videos overview', function () { | |
19 | ||
20 | it('Should fail with a bad pagination', async function () { | |
21 | await getVideosOverview(server.url, 0, 400) | |
22 | await getVideosOverview(server.url, 100, 400) | |
23 | }) | |
24 | ||
25 | it('Should succeed with a good pagination', async function () { | |
26 | await getVideosOverview(server.url, 1) | |
27 | }) | |
28 | }) | |
29 | ||
30 | after(async function () { | |
31 | await cleanupTests([ server ]) | |
32 | }) | |
33 | }) |