source: imaps-frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 606 bytes
Line 
1var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
2var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
3var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
4
5console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
6console.log(b, ': preserveSymlinks true');
7console.log(c, ': preserveSymlinks false');
8
9if (a !== b && a !== c) {
10 throw 'sync: no match';
11}
12console.log('sync: success! a matched either b or c\n');
Note: See TracBrowser for help on using the repository browser.