Lines Matching refs:equal

7     t.equal(resolve, async, '`./async` entry point is the same as `main`');
17 t.equal(res, path.join(dir, 'foo.js'));
18 t.equal(pkg && pkg.name, 'resolve');
23 t.equal(res, path.join(dir, 'foo.js'));
24 t.equal(pkg && pkg.name, 'resolve');
29 t.equal(res, path.join(dir, 'foo.js'));
30 t.equal(pkg && pkg.main, 'resolver');
35 t.equal(res, path.join(dir, 'foo.js'));
36 t.equal(pkg.main, 'resolver');
41 t.equal(res, path.join(dir, 'foo.js'));
45 t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'");
46 t.equal(err.code, 'MODULE_NOT_FOUND');
51 t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'");
61 t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
62 t.equal(pkg, undefined);
67 t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
68 t.equal(pkg, undefined);
73 t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
74 t.equal(pkg.main, 'bar');
84 t.equal(res, path.join(dir, 'baz/quux.js'));
85 t.equal(pkg.main, 'quux.js');
90 t.equal(res, path.join(dir, 'baz/quux.js'));
91 t.equal(pkg.main, 'quux.js');
101 t.equal(res, path.join(dir, 'grux/index.js'));
102 t.equal(pkg, undefined);
107 t.equal(res, path.join(dir, 'grux/index.js'));
108 t.equal(pkg.main, 'biz');
113 t.equal(res, path.join(dir, 'garply/lib/index.js'));
114 t.equal(pkg.main, './lib');
119 t.equal(res, path.join(dir, 'garply/lib/index.js'));
120 t.equal(pkg.main, './lib');
125 t.equal(res, path.join(dir, 'tiv/index.js'));
126 t.equal(pkg, undefined);
131 t.equal(res, path.join(dir, 'tiv/index.js'));
132 t.equal(pkg.main, 'grux');
137 t.equal(res, path.join(dir, 'tiv/index.js'));
138 t.equal(pkg, undefined);
143 t.equal(res, path.join(dir, 'tiv/index.js'));
144 t.equal(pkg.main, './lib');
149 t.equal(res, path.join(dir, 'grux/index.js'));
150 t.equal(pkg, undefined);
155 t.equal(res, path.join(dir, 'grux/index.js'));
156 t.equal(pkg.main, 'tiv');
161 t.equal(res, path.join(dir, 'garply/lib/index.js'));
162 t.equal(pkg.main, './lib');
167 t.equal(res, path.join(dir, 'garply/lib/index.js'));
168 t.equal(pkg.main, './lib');
178 t.equal(res, path.join(dir, 'foo/index.js'));
179 t.equal(pkg.main, 'quux');
189 t.equal(res, path.join(dir, 'index.js'));
190 t.equal(pkg, undefined);
200 t.equal(res, path.join(dir, 'cup.coffee'));
205 t.equal(res, path.join(dir, 'cup.coffee'));
209 t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'");
210 t.equal(err.code, 'MODULE_NOT_FOUND');
215 … t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'");
225 t.equal(res, path.join(dir, 'mug.js'));
230 t.equal(res, path.join(dir, '/mug.coffee'));
234 t.equal(res, path.join(dir, '/mug.js'));
246 t.equal(res, path.join(resolverDir, 'other_path/root.js'));
251 t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js'));
255 t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'");
256 t.equal(err.code, 'MODULE_NOT_FOUND');
260 t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'");
261 t.equal(err.code, 'MODULE_NOT_FOUND');
276 t.equal(res, path.join(resolverDir, 'baz/quux.js'));
277 t.equal(pkg && pkg.name, 'baz');
289 t.equal(res, path.join(dir, 'index.js'));
299 t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
309 t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
319 t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
330 t.equal(
352 t.equal(res, path.join(dir, 'node_modules/mymodule.js'));
364 t.equal(res, path.join(dir, 'same_names/foo.js'));
369 t.equal(res, path.join(dir, 'same_names/foo/index.js'));
380 t.equal(res, path.join(dir, 'same_names/foo/index.js'));
385 t.equal(res, path.join(dir, 'same_names/foo/index.js'));
396 st.equal(res, __filename, 'sanity check');
407 st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
408 st.equal(
425 t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js'));
436 t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js'));
447 t.equal(arguments.length, 1);
448 t.equal(res, undefined);
449 t.equal(pkg, undefined);
451 … t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\'');
452 t.equal(err && err.code, 'MODULE_NOT_FOUND');
462 t.equal(err.message, 'package “invalid_main” `main` must be a string');
463 t.equal(err.code, 'INVALID_PACKAGE_MAIN');
464 t.equal(res, undefined, 'res is undefined');
465 t.equal(pkg, undefined, 'pkg is undefined');
475 t.equal(err.message, 'package “invalid_main” `main` must be a string');
476 t.equal(err.code, 'INVALID_PACKAGE_MAIN');
477 t.equal(res, undefined, 'res is undefined');
478 t.equal(pkg, undefined, 'pkg is undefined');
500 t.equal(res, path.join(dir, 'browser_field', 'b.js'));
501 t.equal(pkg && pkg.main, 'b');
502 t.equal(pkg && pkg.browser, undefined);
513 t.equal(
520 t.equal(
527 t.equal(
534 t.equal(
554 t.equal(res, expected, 'malformed package.json is silently ignored');
555 t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument');
568 … t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored');
569 …t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argum…
578 …t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json p…
591 t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored');
592 …t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argumen…