mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 21:46:48 +00:00

This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
16 lines
485 B
JavaScript
16 lines
485 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
|
|
// `addon` is referenced through the eval expression in testFile
|
|
// eslint-disable-next-line no-unused-vars
|
|
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/);
|