Open rcrichton opened 9 years ago
During a run of npm test I see the following:
npm test
HTTP Router .route ✓ should route an incomming request to the endpoints specific by the channel config ✓ should route binary data 2015-09-15T11:56:42.098Z - error: Internal server error occured: AssertionError: expected Buffer [ 89, 50, 4e, 47, 0d, 0a, 1a, 0a, 00, 00, 00, 0d, 49, 48, 44, 52, 00, 00, 02, 60, 00, 00, 00, bc, 08, 03, 00, 00, 00, e8, d6, e2, 9f, 00, 00, 00, c6, 50, 4c, 54, 45, 00, 00, 00, 3c, 3c, 3b, 03, 66, 33 ] to be Buffer [ 89, 50, 4e, 47, 0d, 0a, 1a, 0a, 00, 00, 00, 0d, 49, 48, 44, 52, 00, 00, 02, 60, 00, 00, 00, bc, 08, 03, 00, 00, 00, e8, d6, e2, 9f, 00, 00, 00, c6, 50, 4c, 54, 45, 00, 00, 00, 3c, 3c, 3b, 03, 66, 33 ] 2015-09-15T11:56:42.098Z - error: AssertionError: expected Buffer [ 89, 50, 4e, 47, 0d, 0a, 1a, 0a, 00, 00, 00, 0d, 49, 48, 44, 52, 00, 00, 02, 60, 00, 00, 00, bc, 08, 03, 00, 00, 00, e8, d6, e2, 9f, 00, 00, 00, c6, 50, 4c, 54, 45, 00, 00, 00, 3c, 3c, 3b, 03, 66, 33 ] to be Buffer [ 89, 50, 4e, 47, 0d, 0a, 1a, 0a, 00, 00, 00, 0d, 49, 48, 44, 52, 00, 00, 02, 60, 00, 00, 00, bc, 08, 03, 00, 00, 00, e8, d6, e2, 9f, 00, 00, 00, c6, 50, 4c, 54, 45, 00, 00, 00, 3c, 3c, 3b, 03, 66, 33 ] at Assertion.fail (/home/ryan/git/openhim-core-js/node_modules/should/lib/assertion.js:180:17) at Assertion.prop.value (/home/ryan/git/openhim-core-js/node_modules/should/lib/assertion.js:65:17) at /home/ryan/git/openhim-core-js/test/unit/routerTest.coffee:99:38 at /home/ryan/git/openhim-core-js/src/middleware/router.coffee:144:13 at _fulfilled (/home/ryan/git/openhim-core-js/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/home/ryan/git/openhim-core-js/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/home/ryan/git/openhim-core-js/node_modules/q/q.js:796:13) at /home/ryan/git/openhim-core-js/node_modules/q/q.js:604:44 at runSingle (/home/ryan/git/openhim-core-js/node_modules/q/q.js:137:13) at flush (/home/ryan/git/openhim-core-js/node_modules/q/q.js:125:13) at doNTCallback0 (node.js:407:9) at process._tickCallback (node.js:336:13)
I think we may need to better handle failures here: https://github.com/jembi/openhim-core-js/blob/master/src/middleware/router.coffee#L147-L149 but I could be wrong. I've just looked quickly.
During a run of
npm test
I see the following: