mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 03:26:57 +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
packages/docusaurus-plugin-content-docs/src
|
@ -74,9 +74,9 @@ function ensureValidVersionString(version: unknown): asserts version is string {
|
|||
function ensureValidVersionArray(
|
||||
versionArray: unknown,
|
||||
): asserts versionArray is string[] {
|
||||
if (!(versionArray instanceof Array)) {
|
||||
if (!Array.isArray(versionArray)) {
|
||||
throw new Error(
|
||||
`The versions file should contain an array of versions! Found content: ${JSON.stringify(
|
||||
`The versions file should contain an array of version names! Found content: ${JSON.stringify(
|
||||
versionArray,
|
||||
)}`,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue