-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
The following tests fail with resolve 1.12.0
$ mocha -R spec
✓ shim found
✓ core shim not found
✓ shim found
✓ core shim not found
✓ module to implicit extension
✓ implicit extension to implicit extension
✓ implicit extension to implicit extension
✓ explicit extension to explicit extension
✓ implicit extension to explicit extension
✓ module implicit extension to explicit extension
✓ module implicit extension to explicit extension
✓ false file
✓ false module
✓ false file
✓ false module
✓ false expand path
✓ local
✓ local
✓ local
✓ index.js of module dir
✓ alternate main
✓ string browser field as main
✓ string browser field as main - require subfile
✓ object browser field as main
✓ object browser field replace file
✓ object browser field replace file - no paths
✓ replace module in browser field object
✓ index.js of module dir
✓ alternate main
✓ string browser field as main
✓ string browser field as main - require subfile
✓ object browser field as main
✓ object browser field as main
✓ object browser field replace file
✓ test foobar -> module-b replacement
✓ test ./x -> ./y replacement
✓ test core -> module-c replacement
✓ test foobar -> module-b replacement with transform
✓ test foobar -> module-i replacement with transform in replacement
✓ object browser field replace file - no paths
✓ replace module in browser field object
✓ override engine shim
✓ alt-browser field
1) index.js of module dir
✓ alternate main
✓ string browser field as main
✓ string browser field as main - require subfile
✓ string alt browser field as main - require subfile
✓ object browser field as main
✓ object browser field as main
2) deep module reference mapping
3) deep module reference mapping without file extension - .js
4) deep module reference mapping without file extension - .json
✓ object browser field replace file
✓ test foobar -> module-b replacement
✓ test core -> module-c replacement
✓ test core -> module-c replacement with alt browser
✓ test foobar -> module-b replacement with transform
✓ test ./x -> ./y replacement
✓ test foobar -> module-i replacement with transform in replacement
✓ object browser field replace file - no paths
✓ replace module in browser field object
✓ override engine shim
✓ alt-browser field
5) alt-browser deep module reference mapping
✓ alt-browser fallback to "browser" on deps of deps
6) not fail on accessing path name defined in Object.prototype
61 passing (198ms)
6 failing
1) index.js of module dir:
Uncaught AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B:
+ expected - actual
- {
- main: 'fixtures'
- }
+ undefined
at test/modules.js:11:16
at index.js:269:13
at node_modules/resolve/lib/async.js:93:25
at maybeUnwrapSymlink (node_modules/resolve/lib/async.js:35:9)
at node_modules/resolve/lib/async.js:89:24
at ondir (node_modules/resolve/lib/async.js:264:27)
at onex (node_modules/resolve/lib/async.js:161:32)
at node_modules/resolve/lib/async.js:11:20
at FSReqWrap.oncomplete (fs.js:155:5)
2) deep module reference mapping:
Uncaught AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Cannot find module 'module-l/direct' from '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures'
at test/modules.js:95:16
at index.js:265:24
at node_modules/resolve/lib/async.js:99:17
at node_modules/resolve/lib/async.js:97:35
at processDirs (node_modules/resolve/lib/async.js:244:39)
at isdir (node_modules/resolve/lib/async.js:251:32)
at node_modules/resolve/lib/async.js:23:69
at FSReqWrap.oncomplete (fs.js:154:21)
3) deep module reference mapping without file extension - .js:
Uncaught AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Cannot find module 'module-n/foo' from '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures'
at test/modules.js:106:16
at index.js:265:24
at node_modules/resolve/lib/async.js:99:17
at node_modules/resolve/lib/async.js:97:35
at processDirs (node_modules/resolve/lib/async.js:244:39)
at isdir (node_modules/resolve/lib/async.js:251:32)
at node_modules/resolve/lib/async.js:23:69
at FSReqWrap.oncomplete (fs.js:154:21)
4) deep module reference mapping without file extension - .json:
Uncaught AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Cannot find module 'module-n/bar' from '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures'
at test/modules.js:113:16
at index.js:265:24
at node_modules/resolve/lib/async.js:99:17
at node_modules/resolve/lib/async.js:97:35
at processDirs (node_modules/resolve/lib/async.js:244:39)
at isdir (node_modules/resolve/lib/async.js:251:32)
at node_modules/resolve/lib/async.js:23:69
at FSReqWrap.oncomplete (fs.js:154:21)
5) alt-browser deep module reference mapping:
Uncaught AssertionError [ERR_ASSERTION]: '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/alt-browser-field/direct.js' == '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/alt-browser-field/chromeapp-direct.js'
+ expected - actual
-/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/alt-browser-field/direct.js
+/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/alt-browser-field/chromeapp-direct.js
at test/modules.js:292:16
at index.js:269:13
at node_modules/resolve/lib/async.js:93:25
at maybeUnwrapSymlink (node_modules/resolve/lib/async.js:35:9)
at node_modules/resolve/lib/async.js:89:24
at onfile (node_modules/resolve/lib/async.js:258:27)
at onex (node_modules/resolve/lib/async.js:161:32)
at node_modules/resolve/lib/async.js:11:20
at FSReqWrap.oncomplete (fs.js:155:5)
6) not fail on accessing path name defined in Object.prototype:
Uncaught AssertionError [ERR_ASSERTION]: 'toString' == '/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/toString/index.js'
+ expected - actual
-toString
+/home/vagrant/forge/debian/git/js-team/node-browser-resolve/test/fixtures/node_modules/toString/index.js
at test/modules.js:317:16
at index.js:269:13
at node_modules/resolve/lib/async.js:87:38
at ondir (node_modules/resolve/lib/async.js:264:27)
at onex (node_modules/resolve/lib/async.js:161:32)
at node_modules/resolve/lib/async.js:11:20
at FSReqWrap.oncomplete (fs.js:155:5)
nicolo-ribaudo
Metadata
Metadata
Assignees
Labels
No labels