Commit Graph

5 Commits

Author SHA1 Message Date
Gabriel Schulhof
4b7f23f868 test: rename n-api to node-api
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>
2021-02-06 05:03:38 -08:00
Octavian Soldea
1ee47d550c n-api: refactoring napi_create_function testing
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>
2019-07-31 23:19:41 -07:00
Octavian Soldea
06c803d9b9 test: pass null params to napi_create_function()
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>
2019-04-10 16:35:22 -07:00
Ruben Bridgewater
f8763bb077
benchmark,doc,lib,test: capitalize comments
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>
2019-03-10 00:44:40 +01:00
Gabriel Schulhof
938e11882b test: partition N-API tests
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>
2018-12-04 13:58:17 -08:00