Skip to content

Commit

Permalink
add ico test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander committed May 13, 2024
1 parent 2e1a98a commit e7f7401
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions test/processImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1398,17 +1398,15 @@ describe('express-processimage', () => {
}),
});
});
// it('should return the correct contentType of a wrongly named ico', () => {
// config.debug = true;
// return expect('GET /reallyaico.gif?metadata', 'to yield response', {
// headers: {
// 'X-Express-Processimage': 'metadata',
// },
// body: {
// contentType: expect.it('to equal', 'image/x-icon')
// },
// });
// });
it('should return the correct contentType of a wrongly named ico', () => {
config.debug = true;
return expect('GET /reallyaico.gif?metadata', 'to yield response', {
body: {
format: expect.it('to equal', 'ico'),
contentType: expect.it('to equal', 'image/x-icon'),
},
});
});
it('should recover gracefully when attempting to process a wrongly named jpeg', () => {
config.debug = true;
return expect('GET /reallyajpeg.gif?resize=40,35', 'to yield response', {
Expand Down

0 comments on commit e7f7401

Please sign in to comment.