diff options
Diffstat (limited to 'shared/extra-utils/miscs/miscs.ts')
-rw-r--r-- | shared/extra-utils/miscs/miscs.ts | 8 |
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 | ||
66 | function buildAbsoluteFixturePath (path: string, customCIPath = false) { | 66 | function buildAbsoluteFixturePath (path: string, customCIPath = false) { |