Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: add test for isExternal
  • Loading branch information
sy-records committed Jun 17, 2023
commit 942a162d2f91019c01065d5ffb03cfb94b7e020c
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();
});
});
});