node/test/addons-napi/test_handle_scope/test.js
Michael Dawson 0ec0272e10 test: improve test coverage for n-api
Add basic tests for handle scopes as code coverage
reports that we are not covering these with the existing
tests.

PR-URL: https://github.com/nodejs/node/pull/12327
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-12 15:26:08 -04:00

11 lines
301 B
JavaScript

'use strict';
const common = require('../../common');
const assert = require('assert');
// testing handle scope api calls
const testHandleScope =
require(`./build/${common.buildType}/test_handle_scope`);
testHandleScope.NewScope();
assert.ok(testHandleScope.NewScopeEscape() instanceof Object);