1 import { HttpStatusCode } from '@shared/models'
2 import { makeGetRequest } from './requests'
4 function checkBadStartPagination (url: string, path: string, token?: string, query = {}) {
5 return makeGetRequest({
9 query: { ...query, start: 'hello' },
10 expectedStatus: HttpStatusCode.BAD_REQUEST_400
14 async function checkBadCountPagination (url: string, path: string, token?: string, query = {}) {
15 await makeGetRequest({
19 query: { ...query, count: 'hello' },
20 expectedStatus: HttpStatusCode.BAD_REQUEST_400
23 await makeGetRequest({
27 query: { ...query, count: 2000 },
28 expectedStatus: HttpStatusCode.BAD_REQUEST_400
32 function checkBadSortPagination (url: string, path: string, token?: string, query = {}) {
33 return makeGetRequest({
37 query: { ...query, sort: 'hello' },
38 expectedStatus: HttpStatusCode.BAD_REQUEST_400
42 // ---------------------------------------------------------------------------
45 checkBadStartPagination,
46 checkBadCountPagination,
47 checkBadSortPagination