summaryrefslogtreecommitdiff
path: root/test/js-native-api/test_function
Commit message (Collapse)AuthorAgeFilesLines
* test: add trailing commas in `test/js-native-api`Antoine du Hamel2023-02-031-3/+3
| | | | | | PR-URL: https://github.com/nodejs/node/pull/46385 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
* node-api: handle pending exception in cb wrapperMichael Dawson2021-08-032-0/+31
| | | | | | | | | | | | | | | | | fixes: https://github.com/nodejs/node-addon-api/issues/1025 The functionreference test from the node-api tests was reporting a failed v8 check when Node.js was compiled as debug. The failure was because an exception was pending but the C++ wrappers were returning a return value that was invalid. Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/39476 Fixes: https://github.com/nodejs/node-addon-api/issues/1025 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
* test: rename n-api to node-apiGabriel Schulhof2021-02-061-69/+48
| | | | | | | | | | This renames the macros used in the tests from `NAPI_*` to `NODE_API_*`. PR-URL: https://github.com/nodejs/node/pull/37217 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* n-api: refactoring napi_create_function testingOctavian Soldea2019-07-313-69/+42
| | | | | | | | | | | | | This is a refactoring of https://github.com/nodejs/node/pull/26998 following https://github.com/nodejs/node/pull/28505. The functions `add_last_status()` and `add_returned_status()` are now reused, see also https://github.com/nodejs/node/pull/28848. PR-URL: https://github.com/nodejs/node/pull/28894 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: pass null params to napi_create_function()Octavian Soldea2019-04-102-0/+99
| | | | | | | | | | | Each one of the following arguments is checked: napi_env env, const char* utf8name, napi_callback cb, napi_value* result. PR-URL: https://github.com/nodejs/node/pull/26998 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
* benchmark,doc,lib,test: capitalize commentsRuben Bridgewater2019-03-101-1/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
* test: partition N-API testsGabriel Schulhof2018-12-043-0/+185
Partition test/addons-napi into test/js-native-api and test/node-api to isolate the Node.js-agnostic portion of the N-API tests from the Node.js-specific portion. PR-URL: https://github.com/nodejs/node/pull/24557 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>