node/test/addons-napi/test_error
Gabriel Schulhof 70b2e169b4
test: fix up N-API error test
Replace assert.throws() with an explicit try/catch in order to catch
the thrown value and be able to compare it strictly to an expected
value.

Re: https://github.com/nodejs/node/pull/20428#issuecomment-386160684

PR-URL: https://github.com/nodejs/node/pull/20487
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-08 18:26:16 -07:00
..
binding.gyp test,n-api: re-write test_error in C 2018-05-04 11:49:32 -04:00
test.js test: fix up N-API error test 2018-05-08 18:26:16 -07:00
test_error.c n-api: make test_error functions static 2018-05-08 14:22:25 -07:00