Skip to content

Commit

Permalink
test: add test for isExternal
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Jun 17, 2023
1 parent bba3ca5 commit 942a162
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unit/core-util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,17 @@ describe('core/util', () => {

expect(result).toBeTruthy();
});

test('external url with one \\', () => {
const result = isExternal('/\\example.github.io/docsify/demo.md');

expect(result).toBeTruthy();
});

test('external url with two \\', () => {
const result = isExternal('/\\\\example.github.io/docsify/demo.md');

expect(result).toBeTruthy();
});
});
});

0 comments on commit 942a162

Please sign in to comment.