Lines Matching full:paths
6 var nodeModulesPaths = require('../lib/node-modules-paths');
8 var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { argument
10 if (paths) {
11 for (var k = 0; k < paths.length; ++k) {
12 moduleDirs.push(path.basename(paths[k]));
38 test('node-modules-paths', function (t) {
57 t.test('with paths=array option', function (t) {
59 var paths = ['a', 'b'];
60 var dirs = nodeModulesPaths(start, { paths: paths }); property
62 verifyDirs(t, start, dirs, null, paths);
67 t.test('with paths=function option', function (t) {
68 var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { function
73 var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); property
80 t.test('with paths=function skipping node modules resolution', function (t) {
81 var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { function
85 var dirs = nodeModulesPaths(start, { paths: paths }); property
100 t.test('with 1 moduleDirectory and paths options', function (t) {
102 var paths = ['a', 'b'];
104 var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); property
106 verifyDirs(t, start, dirs, moduleDirectory, paths);
111 t.test('with 1+ moduleDirectory and paths options', function (t) {
113 var paths = ['a', 'b'];
115 var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); property
117 verifyDirs(t, start, dirs, moduleDirectories, paths);
122 t.test('combine paths correctly on Windows', function (t) {
124 var paths = [];
126 var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); property
133 …t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function …
135 var paths = [];
137 var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); property