diff --git a/packages/downgrader/tests/v3.1-to-v3.0.test.ts b/packages/downgrader/tests/v3.1-to-v3.0.test.ts index fd5a6c4..b738305 100644 --- a/packages/downgrader/tests/v3.1-to-v3.0.test.ts +++ b/packages/downgrader/tests/v3.1-to-v3.0.test.ts @@ -1297,6 +1297,10 @@ describe('downgradeSchemaV31ToV30', () => { expect(owner({ anyOf: [{ type: 'string' }, { type: 'null' }], enum: ['a'] })).toEqual({ oneOf: [ref, onlyNull], }) + // A `not` beside it can reject null too, so the pair stays. + expect(owner({ anyOf: [pet, { type: 'null' }], not: { type: 'null' } })).toEqual({ + anyOf: [ref, onlyNull], + }) expect(owner({ anyOf: [pet, { type: 'null' }] }, { description: 'A' })).toEqual({ description: 'A', anyOf: [ref, onlyNull],