8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d2afb2 commit b2bf6c8Copy full SHA for b2bf6c8
test/addons-napi/test_async/test.js
@@ -6,8 +6,7 @@ const test_async = require(`./build/${common.buildType}/test_async`);
6
test_async.Test(5, common.mustCall(function(err, val) {
7
assert.strictEqual(err, null);
8
assert.strictEqual(val, 10);
9
- process.nextTick(common.mustCall(function() {}));
+ process.nextTick(common.mustCall());
10
}));
11
12
-const cancelSuceeded = function() {};
13
-test_async.TestCancel(common.mustCall(cancelSuceeded));
+test_async.TestCancel(common.mustCall());
test/addons-napi/test_exception/test.js
@@ -4,12 +4,12 @@ const common = require('../../common');
4
const test_exception = require(`./build/${common.buildType}/test_exception`);
5
const assert = require('assert');
const theError = new Error('Some error');
-const throwTheError = function() {
+function throwTheError() {
throw theError;
-};
+}
let caughtError;
< 8000 div class="diff-text-inner">
-const throwNoError = function() {};
+const throwNoError = common.noop;
14
// Test that the native side successfully captures the exception
15
let returnedError = test_exception.returnException(throwTheError);
test/addons-napi/test_instanceof/test.js
@@ -57,14 +57,14 @@ if (typeof Symbol !== 'undefined' && 'hasInstance' in Symbol &&
57
(theObject instanceof theConstructor));
58
}
59
60
- const MyClass = function MyClass() {};
+ function MyClass() {}
61
Object.defineProperty(MyClass, Symbol.hasInstance, {
62
value: function(candidate) {
63
return 'mark' in candidate;
64
65
});
66
67
- const MySubClass = function MySubClass() {};
+ function MySubClass() {}
68
MySubClass.prototype = new MyClass();
69
70
let x = new MySubClass();