Skip to content

Commit 25ff7bf

Browse files
Paul Ashfieldgibfahn
authored andcommitted
test: improve error emssage reporting in testNapiRun.js
PR-URL: #16821 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent 81970f8 commit 25ff7bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎test/addons-napi/test_general/testNapiRun.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const assert = require('assert');
77
// eslint-disable-next-line no-unused-vars
88
constaddon=require(`./build/${common.buildType}/test_general`);
99

10-
assert.strictEqual(addon.testNapiRun('(41.92 + 0.08);'),42,
11-
'napi_run_script() works correctly');
10+
consttestCase='(41.92 + 0.08);';
11+
constexpected=42;
12+
constactual=addon.testNapiRun(testCase);
13+
14+
assert.strictEqual(actual,expected);
1215
assert.throws(()=>addon.testNapiRun({abc: 'def'}),/stringwasexpected/);

0 commit comments

Comments
(0)