mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-24 13:38:02 +02:00
test(utils, mdx-loader, core): improve coverage (#6303)
* test(utils, mdx-loader, core): improve coverage * windows... * fix
This commit is contained in:
parent
cf265c051e
commit
a79c23bc45
38 changed files with 841 additions and 219 deletions
|
@ -13,6 +13,7 @@ import {
|
|||
RemarkPluginsSchema,
|
||||
PluginIdSchema,
|
||||
URISchema,
|
||||
PathnameSchema,
|
||||
} from '../validationSchemas';
|
||||
|
||||
function createTestHelpers({
|
||||
|
@ -128,4 +129,12 @@ describe('validation schemas', () => {
|
|||
testOK(protocolRelativeUrl1);
|
||||
testOK(protocolRelativeUrl2);
|
||||
});
|
||||
|
||||
test('PathnameSchema', () => {
|
||||
const {testFail, testOK} = createTestHelpers({schema: PathnameSchema});
|
||||
|
||||
testOK('/foo');
|
||||
testFail('foo');
|
||||
testFail('https://github.com/foo');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue