Skip to content

Commit 56adba7

Browse files
committed
Add test not to fail on accessing path name defined in Object.prototype
1 parent 86ad2a6 commit 56adba7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/fixtures/node_modules/toString/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/modules.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,12 @@ test('alt-browser fallback to "browser" on deps of deps', function(done) {
296296
done();
297297
});
298298
});
299+
300+
test('not fail on accessing path name defined in Object.prototype', function (done) {
301+
resolve('toString', { paths: [ fixtures_dir ], package: { main: 'fixtures' } }, function(err, path, pkg) {
302+
assert.ifError(err);
303+
assert.equal(path, require.resolve('./fixtures/node_modules/toString/index'));
304+
assert.strictEqual(pkg, undefined);
305+
done();
306+
});
307+
});

0 commit comments

Comments
 (0)