8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55fabd7 commit 2476ab9Copy full SHA for 2476ab9
test/addons-napi/test_general/testNapiRun.js
@@ -7,6 +7,9 @@ const assert = require('assert');
7
// eslint-disable-next-line no-unused-vars
8
const addon = require(`./build/${common.buildType}/test_general`);
9
10
-assert.strictEqual(addon.testNapiRun('(41.92 + 0.08);'), 42,
11
- 'napi_run_script() works correctly');
+const testCase = '(41.92 + 0.08);';
+const expected = 42;
12
+const actual = addon.testNapiRun(testCase);
13
+
14
+assert.strictEqual(actual, expected);
15
assert.throws(() => addon.testNapiRun({ abc: 'def' }), /string was expected/);
0 commit comments