forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: nodejs/abi-stable-node#51 PR-URL: nodejs#15216 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected] Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
- Loading branch information
Gabriel Schulhof
committed
Apr 10, 2018
1 parent
28786e2
commit 32504e1
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters