mirror of https://github.com/lukechilds/node.git
Browse Source
Fixes: https://github.com/nodejs/abi-stable-node/issues/51 PR-URL: https://github.com/nodejs/node/pull/15216 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>canary-base
Gabriel Schulhof
7 years ago
5 changed files with 78 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
'use strict'; |
|||
|
|||
const common = require('../../common'); |
|||
const assert = require('assert'); |
|||
|
|||
// addon is referenced through the eval expression in testFile
|
|||
// eslint-disable-next-line no-unused-vars
|
|||
const addon = require(`./build/${common.buildType}/test_general`); |
|||
|
|||
assert.strictEqual(addon.testNapiRun('(41.92 + 0.08);'), 42, |
|||
'napi_run_script() works correctly'); |
|||
assert.throws(() => addon.testNapiRun({ abc: 'def' }), /string was expected/); |
Loading…
Reference in new issue