Skip to content

Commit ed8dc41

Browse files
- Added required for code to all of the schemas
1 parent 3093449 commit ed8dc41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/utils/test/schema/getFirstMatchingOptionTest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export default function getFirstMatchingOptionTest(testValidator: TestValidatorT
123123
propertyName: 'code',
124124
},
125125
oneOf: [{ $ref: '#/definitions/Foo' }, { $ref: '#/definitions/Bar' }],
126+
required: ['code'],
126127
};
127128
const options = [schema.definitions!.Foo, schema.definitions!.Bar] as RJSFSchema[];
128129
expect(getFirstMatchingOption(testValidator, null, options, schema, 'code')).toEqual(0);
@@ -154,6 +155,7 @@ export default function getFirstMatchingOptionTest(testValidator: TestValidatorT
154155
propertyName: 'code',
155156
},
156157
oneOf: [{ $ref: '#/definitions/Foo' }, { $ref: '#/definitions/Bar' }],
158+
required: ['code'],
157159
};
158160
const formData = { code: 'bar_coding' };
159161
const options = [schema.definitions!.Foo, schema.definitions!.Bar] as RJSFSchema[];
@@ -189,6 +191,7 @@ export default function getFirstMatchingOptionTest(testValidator: TestValidatorT
189191
propertyName: 'code',
190192
},
191193
oneOf: [{ $ref: '#/definitions/Foo' }, { $ref: '#/definitions/Bar' }],
194+
required: ['code'],
192195
};
193196
const formData = { code: ['bar_coding'] };
194197
const options = [schema.definitions!.Foo, schema.definitions!.Bar] as RJSFSchema[];

0 commit comments

Comments
 (0)