Skip to content

Commit

Permalink
test: define NAPI_VERSION before including node_api.h
Browse files Browse the repository at this point in the history
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: #48376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and RafaelGSS committed Jul 3, 2023
1 parent d367b73 commit 407ce3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/cctest/test_linked_binding.cc
Original file line number Diff line number Diff line change
@@ -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"

Expand Down

0 comments on commit 407ce3f

Please sign in to comment.