(currentPage)
| 53 | }) |
| 54 | |
| 55 | function 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 | } |
no outgoing calls
no test coverage detected