diff options
Diffstat (limited to 'shared/extra-utils/miscs')
-rw-r--r-- | shared/extra-utils/miscs/checks.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/extra-utils/miscs/checks.ts b/shared/extra-utils/miscs/checks.ts index aa2c8e8fa..b1be214b1 100644 --- a/shared/extra-utils/miscs/checks.ts +++ b/shared/extra-utils/miscs/checks.ts | |||
@@ -20,6 +20,12 @@ function expectStartWith (str: string, start: string) { | |||
20 | expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.true | 20 | expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.true |
21 | } | 21 | } |
22 | 22 | ||
23 | async function expectLogDoesNotContain (server: PeerTubeServer, str: string) { | ||
24 | const content = await server.servers.getLogContent() | ||
25 | |||
26 | expect(content.toString()).to.not.contain(str) | ||
27 | } | ||
28 | |||
23 | async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { | 29 | async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { |
24 | const res = await makeGetRequest({ | 30 | const res = await makeGetRequest({ |
25 | url, | 31 | url, |
@@ -46,6 +52,7 @@ async function testFileExistsOrNot (server: PeerTubeServer, directory: string, f | |||
46 | export { | 52 | export { |
47 | dateIsValid, | 53 | dateIsValid, |
48 | testImage, | 54 | testImage, |
55 | expectLogDoesNotContain, | ||
49 | testFileExistsOrNot, | 56 | testFileExistsOrNot, |
50 | expectStartWith | 57 | expectStartWith |
51 | } | 58 | } |