aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/miscs/miscs.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/extra-utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts
index f4e86b85a..2239d5bcc 100644
--- a/shared/extra-utils/miscs/miscs.ts
+++ b/shared/extra-utils/miscs/miscs.ts
@@ -56,11 +56,11 @@ async function testImage (url: string, imageName: string, imagePath: string, ext
56 const body = res.body 56 const body = res.body
57 57
58 const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) 58 const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension))
59 const minLength = body.length - ((20 * body.length) / 100) 59 const minLength = body.length - ((30 * body.length) / 100)
60 const maxLength = body.length + ((20 * body.length) / 100) 60 const maxLength = body.length + ((30 * body.length) / 100)
61 61
62 expect(data.length).to.be.above(minLength) 62 expect(data.length).to.be.above(minLength, "the generated image is way smaller than the recorded fixture")
63 expect(data.length).to.be.below(maxLength) 63 expect(data.length).to.be.below(maxLength, "the generated image is way larger than the recorded fixture")
64} 64}
65 65
66function buildAbsoluteFixturePath (path: string, customCIPath = false) { 66function buildAbsoluteFixturePath (path: string, customCIPath = false) {