1 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
3 import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
5 describe('Test videos overview', function () {
6 let server: PeerTubeServer
8 // ---------------------------------------------------------------
10 before(async function () {
13 server = await createSingleServer(1)
16 describe('When getting videos overview', function () {
18 it('Should fail with a bad pagination', async function () {
19 await server.overviews.getVideos({ page: 0, expectedStatus: 400 })
20 await server.overviews.getVideos({ page: 100, expectedStatus: 400 })
23 it('Should succeed with a good pagination', async function () {
24 await server.overviews.getVideos({ page: 1 })
28 after(async function () {
29 await cleanupTests([ server ])