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

Function onPositiveTestFile

cli.js:709–721  ·  view source on GitHub ↗
(schema, testFile, _data, { spinner })

Source from the content-addressed store, hash-verified

707 await assertSchemaHasValidSchemaField(schema)
708 },
709 async onPositiveTestFile(schema, testFile, _data, { spinner }) {
710 assertFileHasNoBom(testFile)
711 assertFileHasCorrectExtensions(testFile.path, [
712 '.json',
713 '.yaml',
714 '.yml',
715 '.toml',
716 ])
717 await assertTestFileHasSchemaPragma(schema, testFile, spinner)
718 if (testFile.path.endsWith('.json')) {
719 await assertFilePassesJsonLint(testFile)
720 }
721 },
722 async onNegativeTestFile(schema, testFile, _data, { spinner }) {
723 assertFileHasNoBom(testFile)
724 assertFileHasCorrectExtensions(testFile.path, [

Callers

nothing calls this directly

Tested by

no test coverage detected