diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h index 291bc5962bed77..2f7ab06c14334f 100644 --- a/test/cctest/node_test_fixture.h +++ b/test/cctest/node_test_fixture.h @@ -73,11 +73,13 @@ class NodeTestFixture : public ::testing::Test { if (!node_initialized) { uv_os_unsetenv("NODE_OPTIONS"); node_initialized = true; - int argc = 1; - const char* argv0 = "cctest"; - int exec_argc; - const char** exec_argv; - node::Init(&argc, &argv0, &exec_argc, &exec_argv); + std::vector argv { "cctest" }; + std::vector exec_argv; + std::vector errors; + + int exitcode = node::InitializeNodeWithArgs(&argv, &exec_argv, &errors); + CHECK_EQ(exitcode, 0); + CHECK(errors.empty()); } tracing_agent = std::make_unique();