We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81970f8 commit 25ff7bfCopy full SHA for 25ff7bf
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