expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.true
}
+function expectNotStartWith (str: string, start: string) {
+ expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.false
+}
+
async function expectLogDoesNotContain (server: PeerTubeServer, str: string) {
const content = await server.servers.getLogContent()
expect(content.toString()).to.not.contain(str)
}
+async function expectLogContain (server: PeerTubeServer, str: string) {
+ const content = await server.servers.getLogContent()
+
+ expect(content.toString()).to.contain(str)
+}
+
async function testImage (url: string, imageName: string, imageHTTPPath: string, extension = '.jpg') {
const res = await makeGetRequest({
url,
expectLogDoesNotContain,
testFileExistsOrNot,
expectStartWith,
+ expectNotStartWith,
checkBadStartPagination,
checkBadCountPagination,
- checkBadSortPagination
+ checkBadSortPagination,
+ expectLogContain
}