Skip to content

Commit 942a162

Browse files
committed
test: add test for isExternal
1 parent bba3ca5 commit 942a162

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/unit/core-util.test.js

+12
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,17 @@ describe('core/util', () => {
5959

6060
expect(result).toBeTruthy();
6161
});
62+
63+
test('external url with one \\', () => {
64+
const result = isExternal('/\\example.github.io/docsify/demo.md');
65+
66+
expect(result).toBeTruthy();
67+
});
68+
69+
test('external url with two \\', () => {
70+
const result = isExternal('/\\\\example.github.io/docsify/demo.md');
71+
72+
expect(result).toBeTruthy();
73+
});
6274
});
6375
});

0 commit comments

Comments
 (0)