Skip to content

Commit

Permalink
Add failing test [ci skip].
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Feb 9, 2016
1 parent a26cabb commit 526fdd3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"svgfilter": "1.1.0"
},
"devDependencies": {
"compression": "1.6.1",
"coveralls": "2.11.4",
"express": "4.13.3",
"istanbul": "0.4.0",
Expand Down
21 changes: 21 additions & 0 deletions test/processImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,4 +536,25 @@ describe('express-processimage', function () {
});
});
});

it('should process a big image when the compression middleware is present above express-processimage', function () {
return expect(
express()
.use(require('compression')())
.use(processImage())
.use(express['static'](root)),
'to yield exchange', {
request: 'GET /the-villa-facade.png?sourceContentType=image%2Fpng&ignoreAspectRatio&resize=652,435&extract=315,10,280,420',
response: {
body: expect.it('to have metadata satisfying', {
format: 'PNG',
size: {
width: 280,
height: 420
}
})
}
}
);
});
});
Binary file added testdata/the-villa-facade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 526fdd3

Please sign in to comment.