diff --git a/test/node-api/test_async/test_async.cc b/test/node-api/test_async/test_async.cc index 49db7aa66f190b..ff3d2749a9d184 100644 --- a/test/node-api/test_async/test_async.cc +++ b/test/node-api/test_async/test_async.cc @@ -1,3 +1,4 @@ +#include #include #include #include "../../js-native-api/common.h" @@ -29,10 +30,7 @@ void Execute(napi_env env, void* data) { #endif carrier* c = static_cast(data); - if (c != &the_carrier) { - napi_throw_type_error(env, nullptr, "Wrong data parameter to Execute."); - return; - } + assert(c == &the_carrier); c->_output = c->_input * 2; }