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
7 changes: 4 additions & 3 deletions packages/downgrader/tests/v3.2-to-v3.1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,13 @@ describe('downgradeSpecV32ToV31', () => {
{ '#/components/securitySchemes/other': ['read'] },
{},
])
// A scheme holding undefined is missing, as the output leaves it out.
// A scheme or a requirement name holding undefined is missing, as the
// output leaves it out.
const unset = convert({
security: [{ key: [], unset: [] }],
security: [{ key: [], unset: [] }, { key: undefined }],
components: { securitySchemes: { key, unset: undefined } },
} as any)
expect(unset.security).toEqual([{ key: [] }])
expect(unset.security).toStrictEqual([{ key: [] }, {}])
expect(unset.components?.securitySchemes).toStrictEqual({ key })
// Without any schemes, every name is left out, and malformed values stay.
const malformed = convert({
Expand Down
Loading