MCPcopy Index your code
hub / github.com/github/docs / validate

Function validate

tests/content/site-tree.js:55–64  ·  view source on GitHub ↗
(currentPage)

Source from the content-addressed store, hash-verified

53})
54
55function validate(currentPage) {
56 ;(currentPage.childPages || []).forEach((childPage) => {
57 const { valid, errors } = revalidator.validate(childPage, schema.childPage)
58 const expectation = JSON.stringify(errors, null, 2)
59 expect(valid, expectation).toBe(true)
60
61 // Run recurisvely until we run out of child pages
62 validate(childPage)
63 })
64}

Callers 2

validationMiddlewareFunction · 0.85
site-tree.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected