Skip to content

Commit

Permalink
test: Add more tests for aliasing (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatfisz committed Aug 6, 2017
1 parent 7511f9e commit d4558ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,30 @@ describe('module-resolver', () => {
});
});

describe('with alias for a relative path (with respect to the cwd)', () => {
it('should alias the file path sharing a directory', () => {
testWithImport(
'test',
'./testproject/test',
{
...aliasTransformerOpts,
filename: './test/foo.js',
},
);
});

it('should alias the file path in another directory', () => {
testWithImport(
'test',
'../test/testproject/test',
{
...aliasTransformerOpts,
filename: './lib/bar.js',
},
);
});
});

describe('with an alias containing a slash', () => {
it('should alias the file path', () => {
testWithImport(
Expand Down

0 comments on commit d4558ae

Please sign in to comment.