mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-24 05:28:01 +02:00
fix(v2): allow relative URLs in URISchema #3449
This commit is contained in:
parent
55cd7a7b5a
commit
fe78cbeff5
3 changed files with 7 additions and 3 deletions
|
@ -111,12 +111,16 @@ describe('validation schemas', () => {
|
|||
test('URISchema', () => {
|
||||
const validURL = 'https://docusaurus.io';
|
||||
const doubleHash = 'https://docusaurus.io#github#/:';
|
||||
const invalidURL = 'invalidURL';
|
||||
const invalidURL = 'spaces are invalid in a URL';
|
||||
const relativeURL = 'relativeURL';
|
||||
const relativeURLWithParent = '../relativeURLWithParent';
|
||||
const urlFromIssue = 'https://riot.im/app/#/room/#ligo-public:matrix.org';
|
||||
const {testFail, testOK} = createTestHelpers({schema: URISchema});
|
||||
testOK(validURL);
|
||||
testOK(doubleHash);
|
||||
testFail(invalidURL);
|
||||
testOK(relativeURL);
|
||||
testOK(relativeURLWithParent);
|
||||
testOK(urlFromIssue);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue