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.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/tests/shared/checks.ts b/server/tests/shared/checks.ts
index 55ebc6c3e..523d37420 100644
--- a/server/tests/shared/checks.ts
+++ b/server/tests/shared/checks.ts
@@ -23,6 +23,12 @@ function expectNotStartWith (str: string, start: string) {
23 expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.false 23 expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.false
24} 24}
25 25
26function expectEndWith (str: string, end: string) {
27 expect(str.endsWith(end), `${str} does not end with ${end}`).to.be.true
28}
29
30// ---------------------------------------------------------------------------
31
26async function expectLogDoesNotContain (server: PeerTubeServer, str: string) { 32async function expectLogDoesNotContain (server: PeerTubeServer, str: string) {
27 const content = await server.servers.getLogContent() 33 const content = await server.servers.getLogContent()
28 34
@@ -103,6 +109,7 @@ export {
103 testFileExistsOrNot, 109 testFileExistsOrNot,
104 expectStartWith, 110 expectStartWith,
105 expectNotStartWith, 111 expectNotStartWith,
112 expectEndWith,
106 checkBadStartPagination, 113 checkBadStartPagination,
107 checkBadCountPagination, 114 checkBadCountPagination,
108 checkBadSortPagination, 115 checkBadSortPagination,