Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 25ff7bf

Browse filesBrowse files
Paul Ashfieldgibfahn
authored andcommitted
test: improve error emssage reporting in testNapiRun.js
PR-URL: #16821 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 81970f8 commit 25ff7bf
Copy full SHA for 25ff7bf

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/addons-napi/test_general/testNapiRun.js
+5-2Lines 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
const addon = require(`./build/${common.buildType}/test_general`);
99

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.