Closed k88hudson closed 7 years ago
Not sure if we want to add tests for 128x128 image sizes:
it("should have 128x128 images", (done) => {
const imagePath = join("images", site.image_url);
fastimage.info(imagePath, (err, { width, height }) => {
assert.isNull(err);
assert.equal(width, 128, `${site.image_url} to have width of 128`);
assert.equal(height, 128, `${site.image_url} to have height of 128`);
done();
});
});
1) top_sites #41 dailymail should have 128x128 images:
Uncaught AssertionError: dailymail-co-uk.png to have width of 128: expected 64 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
2) top_sites #42 dailybeast should have 128x128 images:
Uncaught AssertionError: dailybeast-com.png to have width of 128: expected 64 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
3) top_sites #88 images.google should have 128x128 images:
Uncaught AssertionError: images-google-com.png to have width of 128: expected 64 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
4) top_sites #103 jcpenney should have 128x128 images:
Uncaught AssertionError: jcpenney-com.png to have width of 128: expected 64 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
5) top_sites #175 verizonwireless should have 128x128 images:
Uncaught AssertionError: verizonwireless-com.png to have width of 128: expected 106 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
6) top_sites #184 wikia should have 128x128 images:
Uncaught AssertionError: wikia-com.png to have width of 128: expected 64 to equal 128
at fastimage.info (test/index.test.js:57:18)
at done (node_modules/fastimage/lib/core.js:286:11)
at imageSize (node_modules/fastimage/lib/core.js:162:12)
at node_modules/image-size/lib/index.js:96:7
at node_modules/image-size/lib/index.js:49:9
at FSReqWrap.oncomplete (fs.js:112:15)
FWIW, it looks like a few images aren't 128x128. Not sure if those will cause issues: