mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
5d38d543cd
Add the `--preserve-symlinks` flag. This makes the changes added in #5950 conditional. By default the old behavior is used. With the flag set, symlinks are preserved, switching to the new behavior. This should be considered to be a temporary solution until we figure out how to solve the symlinked peer dependency problem in a more general way that does not break everything else. Additional test cases are included. PR-URL: https://github.com/nodejs/node/pull/6537 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
14 lines
394 B
JavaScript
14 lines
394 B
JavaScript
'use strict';
|
|
require('../../common');
|
|
const path = require('path');
|
|
const assert = require('assert');
|
|
|
|
// This is a subtest of symlinked-module/test.js. This is not
|
|
// intended to be run directly.
|
|
|
|
module.exports.test = function test(bindingDir) {
|
|
const mod = require(path.join(bindingDir, 'binding.node'));
|
|
assert.notStrictEqual(mod, null);
|
|
assert.strictEqual(mod.hello(), 'world');
|
|
};
|