mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-09 22:32:53 +02:00
test: improve test coverage; properly test core client APIs (#6905)
* test: improve test coverage * fix
This commit is contained in:
parent
76cb012209
commit
d85cee576d
41 changed files with 1400 additions and 753 deletions
|
@ -63,12 +63,11 @@ export default function getSlug({
|
|||
function ensureValidSlug(slug: string): string {
|
||||
if (!isValidPathname(slug)) {
|
||||
throw new Error(
|
||||
`We couldn't compute a valid slug for document with id "${baseID}" in "${sourceDirName}" directory.
|
||||
`We couldn't compute a valid slug for document with ID "${baseID}" in "${sourceDirName}" directory.
|
||||
The slug we computed looks invalid: ${slug}.
|
||||
Maybe your slug front matter is incorrect or you use weird chars in the file path?
|
||||
By using the slug front matter, you should be able to fix this error, by using the slug of your choice:
|
||||
Maybe your slug front matter is incorrect or there are special characters in the file path?
|
||||
By using front matter to set a custom slug, you should be able to fix this error:
|
||||
|
||||
Example =>
|
||||
---
|
||||
slug: /my/customDocPath
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue