From e6dfa58689e88633db8304a8541a75edd893c645 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 31 May 2020 20:03:28 +0200 Subject: space optimizations for `node_modules` and client stats removal - replace sharp with lighter jimp alternative - remove stats in builds fixes #2807 --- shared/extra-utils/miscs/miscs.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'shared/extra-utils/miscs') 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 const body = res.body const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) - const minLength = body.length - ((20 * body.length) / 100) - const maxLength = body.length + ((20 * body.length) / 100) + const minLength = body.length - ((30 * body.length) / 100) + const maxLength = body.length + ((30 * body.length) / 100) - expect(data.length).to.be.above(minLength) - expect(data.length).to.be.below(maxLength) + expect(data.length).to.be.above(minLength, "the generated image is way smaller than the recorded fixture") + expect(data.length).to.be.below(maxLength, "the generated image is way larger than the recorded fixture") } function buildAbsoluteFixturePath (path: string, customCIPath = false) { -- cgit v1.2.3