mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
b0a334be8d
PR-URL: https://github.com/nodejs/node/pull/25119 Refs: https://eslint.org/docs/user-guide/command-line-interface#--report-unused-disable-directives Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
15 lines
442 B
JavaScript
15 lines
442 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
|
|
// `addon` is referenced through the eval expression in testFile
|
|
const addon = require(`./build/${common.buildType}/test_general`);
|
|
|
|
const testCase = '(41.92 + 0.08);';
|
|
const expected = 42;
|
|
const actual = addon.testNapiRun(testCase);
|
|
|
|
assert.strictEqual(actual, expected);
|
|
assert.throws(() => addon.testNapiRun({ abc: 'def' }), /string was expected/);
|