Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Apr 4, 2022
1 parent 4f01ac2 commit 13b769a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ describe("alias", function () {
.resolveSync({}, "/", "aliasA/dir/index")
.should.be.eql("/a/dir/index");
});
it('should resolve "#" alias', () => {
resolver.resolveSync({}, "/", "#").should.be.eql("/c/dir/index");
resolver.resolveSync({}, "/", "#/index").should.be.eql("/c/dir/index");
});
it('should resolve "@" alias', () => {
resolver.resolveSync({}, "/", "@").should.be.eql("/c/dir/index");
resolver.resolveSync({}, "/", "@/index").should.be.eql("/c/dir/index");
});
it("should resolve an ignore module", () => {
resolver.resolveSync({}, "/", "ignored").should.be.eql(false);
});
Expand Down

0 comments on commit 13b769a

Please sign in to comment.