diff --git a/packages/downgrader/tests/v3.2-to-v3.1.test.ts b/packages/downgrader/tests/v3.2-to-v3.1.test.ts index 3e6a8e9..c7910c4 100644 --- a/packages/downgrader/tests/v3.2-to-v3.1.test.ts +++ b/packages/downgrader/tests/v3.2-to-v3.1.test.ts @@ -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({