-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: #15216
- Loading branch information
Gabriel Schulhof
committed
Sep 6, 2017
1 parent
1403d28
commit ca0d064
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