test: define NAPI_VERSION before including node_api.h

Include node.h first to define NAPI_VERSION that node binary is built
with. The node.h should also be included first in embedder's use case
since it is the primary header file.

PR-URL: https://github.com/nodejs/node/pull/48376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
Chengzhong Wu authored and RafaelGSS committed 2023-07-03 10:38:39 -03:00
1 parent d367b73f43
commit 407ce3fdcb
1 file changed
+4
+4
View File
@@ -1,3 +1,7 @@
// Include node.h first to define NAPI_VERSION built with the
// binary.
// The node.h should also be included first in embedder's use case.
#include "node.h"
#include "node_api.h"
#include "node_test_fixture.h"