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>
This commit is contained in:
Gabriel Schulhof 2021-02-03 12:01:28 -08:00 committed by Rich Trott
parent 2ff1c83518
commit 4b7f23f868
52 changed files with 1371 additions and 1448 deletions

View file

@ -5,19 +5,19 @@ static napi_value Test(napi_env env, napi_callback_info info) {
napi_value err;
size_t argc = 1;
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &err, NULL, NULL));
NODE_API_CALL(env, napi_get_cb_info(env, info, &argc, &err, NULL, NULL));
NAPI_CALL(env, napi_fatal_exception(env, err));
NODE_API_CALL(env, napi_fatal_exception(env, err));
return NULL;
}
static napi_value Init(napi_env env, napi_value exports) {
napi_property_descriptor properties[] = {
DECLARE_NAPI_PROPERTY("Test", Test),
DECLARE_NODE_API_PROPERTY("Test", Test),
};
NAPI_CALL(env, napi_define_properties(
NODE_API_CALL(env, napi_define_properties(
env, exports, sizeof(properties) / sizeof(*properties), properties));
return exports;