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 ruyadorno committed Sep 12, 2023
1 parent 13ac0a5 commit f2ce8e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/cctest/test_linked_binding.cc
@@ -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 f2ce8e0

Please sign in to comment.