(assertion)
| 82 | } |
| 83 | |
| 84 | function withGeneratedSpec(assertion) { |
| 85 | const snapshot = snapshotGeneratedFiles(); |
| 86 | try { |
| 87 | execFileSync(process.execPath, ['scripts/generate-openapi.js'], { |
| 88 | cwd: coreRoot, |
| 89 | stdio: 'pipe', |
| 90 | }); |
| 91 | |
| 92 | const spec = JSON.parse(fs.readFileSync(openApiPath, 'utf8')); |
| 93 | return assertion(spec); |
| 94 | } finally { |
| 95 | restoreGeneratedFiles(snapshot); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | describe('OpenAPI SDK code samples', () => { |
| 100 | test('uses support-scoped hosted API description', () => { |
no test coverage detected