Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/spec/scripts/openapi-self-consistency.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,14 @@ describe('build-openapi.ts end to end', () => {
),
);
expect(run.status).not.toBe(0);
// A non-zero status and a missing artifact are BOTH satisfied by a subprocess
// that never started, so on their own they cannot tell "the gate refused the
// write" apart from "the spawn failed to launch" — which is how this case
// stayed green while the gate it pins never ran once. The generator's own
// diagnostic is what pins the refusal to the gate, and it is the assertion
// the three siblings above already carry.
expect(run.output).toMatch(/unresolvable \$ref/);
expect(run.output).toContain('#/components/schemas/ApiErrorTypo');
// The gate runs before the write, so no half-broken document is published.
expect(fs.existsSync(run.artifact)).toBe(false);
});
Expand Down
Loading