Uh oh!
There was an error while loading. Please reload this page.
test: refactor of zlib-from-gzip-with-trailing-garbage - #10674
Conversation
There was a problem hiding this comment.
it would likely be worthwhile validating the details of the error reported
There was a problem hiding this comment.
I would also recommend restoring result as an argument and adding an assertion for it. So all together, maybe something like this?:
assert(errinstanceofError);assert.strictEqual(err.code,'Z_DATA_ERROR');assert.strictEqual(err.message,'unknown compression method');assert.strictEqual(result,undefined);There was a problem hiding this comment.
New commit pushed up with these suggestions included. Thanks to the both of you for the help. Long time listener, first time committer. 😄
There was a problem hiding this comment.
Same suggestions here as above. Restore result, add an assertion to confirm it is undefined, and do some more rigorous checking on err.
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * removed unused arguments
* restore result args and validate response * validate error message and code
jasnell
commented
Jan 9, 2017
lfkwtz
commented
Jan 9, 2017
@jasnell I see one test failed... any suggestion on how to fix this? |
lpinca
commented
Jan 9, 2017
@leftynaut |
jbergstroem
commented
Jan 9, 2017
Bug here: nodejs/github-bot#108 |
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: nodejs#10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Trott
commented
Jan 10, 2017
Landed in 39c4af5. |
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: nodejs#10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: nodejs#10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: nodejs#10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: nodejs#10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: #10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use assert.strictEqual instead of assert.equal * add RegExp in second argument of assert.throws * validate error message and code PR-URL: #10674 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Checklist