We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b886fc + 5272778 commit 23619afCopy full SHA for 23619af
test/specs.js
@@ -166,6 +166,17 @@ describe('module-alias', function () {
166
})
167
168
169
+ it('should work with require.resolve', function () {
170
+ var aliasedDir = path.join(__dirname, 'src', 'foo')
171
+ moduleAlias.addAliases({
172
+ 'some-alias': aliasedDir
173
+ })
174
+
175
+ var bar = require.resolve('some-alias')
176
177
+ expect(bar).to.equal(path.join(aliasedDir, 'index.js'))
178
179
180
it('should match longest alias first', function () {
181
moduleAlias.addAliases({
182
'react-dom': path.join(__dirname, 'src/bar/baz'),
0 commit comments