MCPcopy Index your code
hub / github.com/SchemaStore/schemastore / schemaNamesMustExist

Function schemaNamesMustExist

cli.js:1481–1493  ·  view source on GitHub ↗
(
    /** @type {string[]} */ schemaNames,
    /** @type {string} */ propertyName,
  )

Source from the content-addressed store, hash-verified

1479
1480async function assertSchemaValidationJsonReferencesNoNonexistentFiles() {
1481 const schemaNamesMustExist = (
1482 /** @type {string[]} */ schemaNames,
1483 /** @type {string} */ propertyName,
1484 ) => {
1485 for (const schemaName of schemaNames) {
1486 if (!SchemasToBeTested.includes(`${schemaName}`)) {
1487 printErrorAndExit(new Error(), [
1488 `Expected to find file at path "${SchemaDir}/${schemaName}"`,
1489 `Filename "${schemaName}" declared in file "${SchemaValidationFile}" under property "${propertyName}[]"`,
1490 ])
1491 }
1492 }
1493 }
1494
1495 schemaNamesMustExist(SchemaValidation.ajvNotStrictMode, 'ajvNotStrictMode')
1496 schemaNamesMustExist(SchemaValidation.skiptest, 'skiptest')

Calls 1

printErrorAndExitFunction · 0.85

Tested by

no test coverage detected