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 <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
legendecas authored and ruyadorno committed Sep 10, 2023
1 parent 161f8c2 commit 73fdd37
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 73fdd37

Please sign in to comment.