New rule: oversized images (#276)

New rule: oversized images
This commit is contained in:
Gaël Métais
2019-01-13 17:18:03 +05:30
committed by GitHub
parent fa216dddd5
commit 8ffab2ae70
10 changed files with 200 additions and 6 deletions
+8
View File
@@ -109,6 +109,11 @@ describe('redownload', function() {
];
var data = {
params: {
options: {
device: 'phone'
}
},
toolsResults: {
phantomas: {
metrics: {
@@ -140,6 +145,9 @@ describe('redownload', function() {
data.toolsResults.redownload.offenders.imageOptimization.totalGain.should.be.above(0);
data.toolsResults.redownload.offenders.imageOptimization.images.length.should.equal(2);
data.toolsResults.redownload.offenders.should.have.a.property('imagesTooLarge');
data.toolsResults.redownload.offenders.imagesTooLarge.length.should.equal(0);
data.toolsResults.redownload.offenders.should.have.a.property('gzipCompression');
data.toolsResults.redownload.offenders.gzipCompression.totalGain.should.be.above(0);
data.toolsResults.redownload.offenders.gzipCompression.files.length.should.equal(5);