| 18 | } |
| 19 | |
| 20 | class Test : public Napi::ObjectWrap<Test> { |
| 21 | public: |
| 22 | Test(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Test>(info) { |
| 23 | #ifdef NAPI_CPP_EXCEPTIONS |
| 24 | throw Napi::Error::New(Env(), "Some error"); |
| 25 | #else |
| 26 | Napi::Error::New(Env(), "Some error").ThrowAsJavaScriptException(); |
| 27 | #endif |
| 28 | } |
| 29 | |
| 30 | static void Initialize(Napi::Env env, Napi::Object exports) { |
| 31 | exports.Set("Test", DefineClass(env, "Test", {})); |
| 32 | exports.Set("getDtorCalled", Napi::Function::New(env, GetDtorCalled)); |
| 33 | } |
| 34 | |
| 35 | private: |
| 36 | DtorCounter dtor_counter_; |
| 37 | }; |
| 38 | |
| 39 | } // anonymous namespace |
| 40 |
nothing calls this directly
no outgoing calls
no test coverage detected