aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-05-31 20:03:28 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-06-10 14:01:49 +0200
commite6dfa58689e88633db8304a8541a75edd893c645 (patch)
treeb8a06bf38370328e753940a8c2ae85d6d03413a5 /shared
parentb84d4c809f0b1c4b3f2029f56b81dbca37364f36 (diff)
downloadPeerTube-e6dfa58689e88633db8304a8541a75edd893c645.tar.gz
PeerTube-e6dfa58689e88633db8304a8541a75edd893c645.tar.zst
PeerTube-e6dfa58689e88633db8304a8541a75edd893c645.zip
space optimizations for `node_modules` and client stats removal
- replace sharp with lighter jimp alternative - remove stats in builds fixes #2807
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) {