diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:18:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:18:43 +0100 |
commit | c47c3bcb0a9265d2a414ec96075052f8619d3f21 (patch) | |
tree | 0445880c36ae793a26a3106740f96b4bd9b67eff /server/tests/shared | |
parent | 4c6d99e5b69b29e19d53ede14414b76beef815e2 (diff) | |
download | PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.tar.gz PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.tar.zst PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.zip |
Fix multiple servers tests
Diffstat (limited to 'server/tests/shared')
-rw-r--r-- | server/tests/shared/checks.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/shared/checks.ts b/server/tests/shared/checks.ts index 8c8260088..dcc16d7ea 100644 --- a/server/tests/shared/checks.ts +++ b/server/tests/shared/checks.ts | |||
@@ -35,8 +35,8 @@ async function testImage (url: string, imageName: string, imageHTTPPath: string, | |||
35 | const body = res.body | 35 | const body = res.body |
36 | 36 | ||
37 | const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) | 37 | const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) |
38 | const minLength = data.length - ((30 * data.length) / 100) | 38 | const minLength = data.length - ((40 * data.length) / 100) |
39 | const maxLength = data.length + ((30 * data.length) / 100) | 39 | const maxLength = data.length + ((40 * data.length) / 100) |
40 | 40 | ||
41 | expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture') | 41 | expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture') |
42 | expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') | 42 | expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') |