mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
This reverts commit d9b59def72.
Breaks downloadable source tarball builds as we remove some files prior
to creating a tarball but those files are included in the comprehensive
list of dependencies listed in .deps.
Ref: https://github.com/nodejs/node/pull/17407
PR-URL: https://github.com/nodejs/node/pull/18287
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
32 lines
745 B
JavaScript
32 lines
745 B
JavaScript
'use strict';
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
|
|
// testing api calls for function
|
|
const test_function = require(`./build/${common.buildType}/test_function`);
|
|
|
|
|
|
function func1() {
|
|
return 1;
|
|
}
|
|
assert.strictEqual(test_function.TestCall(func1), 1);
|
|
|
|
function func2() {
|
|
console.log('hello world!');
|
|
return null;
|
|
}
|
|
assert.strictEqual(test_function.TestCall(func2), null);
|
|
|
|
function func3(input) {
|
|
return input + 1;
|
|
}
|
|
assert.strictEqual(test_function.TestCall(func3, 1), 2);
|
|
|
|
function func4(input) {
|
|
return func3(input);
|
|
}
|
|
assert.strictEqual(test_function.TestCall(func4, 1), 2);
|
|
|
|
assert.strictEqual(test_function.TestName.name, 'Name');
|
|
assert.strictEqual(test_function.TestNameShort.name, 'Name_');
|