From e7f740179a898603f9340db5c69b3132c722115b Mon Sep 17 00:00:00 2001 From: alexander Date: Mon, 13 May 2024 15:43:59 +0400 Subject: [PATCH] add ico test --- test/processImage.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/test/processImage.js b/test/processImage.js index 49528ad..45bb329 100644 --- a/test/processImage.js +++ b/test/processImage.js @@ -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', {