Skip to content

Instantly share code, notes, and snippets.

@papandreou
Created March 14, 2016 09:12
Show Gist options
  • Select an option

  • Save papandreou/7380a3932d0ad7ae5ee9 to your computer and use it in GitHub Desktop.

Select an option

Save papandreou/7380a3932d0ad7ae5ee9 to your computer and use it in GitHub Desktop.
duplicated Unexpected error message
2) express-processimage when sharp is available should support rotate with a single argument for gm:
expected 'GET /bulb.gif?rotate=90' to yield response
{
headers: { 'X-Express-Processimage': 'gm' },
body: expect.it('to have metadata satisfying', { format: 'GIF', size: ... })
.and('to resemble', '/home/andreas/work/express-processimage/testdata/rotatedBulb.gif')
}
GET /bulb.gif?rotate=90 HTTP/1.1
HTTP/1.1 200 OK
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Wed, 09 Mar 2016 14:50:48 GMT
ETag: W/"5c8-1535bdbd940-processimage"
Content-Type: image/gif
X-Express-Processimage: gifsicle // should equal gm
// -gifsicle
// +gm
Date: Mon, 14 Mar 2016 09:09:18 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Buffer[1498] (image/gif)
UnexpectedError:
expected 'GET /bulb.gif?rotate=90' to yield response
{
headers: { 'X-Express-Processimage': 'gm' },
body: expect.it('to have metadata satisfying', { format: 'GIF', size: ... })
.and('to resemble', 'testdata/rotatedBulb.gif')
}
GET /bulb.gif?rotate=90 HTTP/1.1
HTTP/1.1 200 OK
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Wed, 09 Mar 2016 14:50:48 GMT
ETag: W/"5c8-1535bdbd940-processimage"
Content-Type: image/gif
X-Express-Processimage: gifsicle // should equal gm
// -gifsicle
// +gm
Date: Mon, 14 Mar 2016 09:09:18 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Buffer[1498] (image/gif)
at node_modules/unexpected/lib/createWrappedExpectProto.js:63:35
at tryCatcher (node_modules/unexpected/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/unexpected/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (node_modules/unexpected/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (node_modules/unexpected/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (node_modules/unexpected/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (node_modules/unexpected/node_modules/bluebird/js/main/async.js:133:10)
at Async.drainQueues (node_modules/unexpected/node_modules/bluebird/js/main/async.js:15:14)
at node_modules/unexpected/lib/workQueue.js:8:13
at Array.forEach (native)
at Object.workQueue.drain (node_modules/unexpected/lib/workQueue.js:7:20)
at node_modules/unexpected/lib/workQueue.js:17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment