aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/shared/checks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/shared/checks.ts')
-rw-r--r--server/tests/shared/checks.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/tests/shared/checks.ts b/server/tests/shared/checks.ts
index c0098b293..d7eb25bb5 100644
--- a/server/tests/shared/checks.ts
+++ b/server/tests/shared/checks.ts
@@ -11,7 +11,7 @@ import { HttpStatusCode } from '@shared/models'
11import { makeGetRequest, PeerTubeServer } from '@shared/server-commands' 11import { makeGetRequest, PeerTubeServer } from '@shared/server-commands'
12 12
13// Default interval -> 5 minutes 13// Default interval -> 5 minutes
14function dateIsValid (dateString: string, interval = 300000) { 14function dateIsValid (dateString: string | Date, interval = 300000) {
15 const dateToCheck = new Date(dateString) 15 const dateToCheck = new Date(dateString)
16 const now = new Date() 16 const now = new Date()
17 17
@@ -90,6 +90,8 @@ async function testFileExistsOrNot (server: PeerTubeServer, directory: string, f
90 expect(await pathExists(join(base, filePath))).to.equal(exist) 90 expect(await pathExists(join(base, filePath))).to.equal(exist)
91} 91}
92 92
93// ---------------------------------------------------------------------------
94
93function checkBadStartPagination (url: string, path: string, token?: string, query = {}) { 95function checkBadStartPagination (url: string, path: string, token?: string, query = {}) {
94 return makeGetRequest({ 96 return makeGetRequest({
95 url, 97 url,