mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 10:33:44 +03:00
tests: rewrite test to not use useless snapshot
This commit is contained in:
parent
a6ae43a136
commit
a7e9254b6c
|
@ -23,8 +23,11 @@ describe('Components', () => {
|
|||
'#/components/schemas/Pet',
|
||||
options,
|
||||
);
|
||||
const schemaView = shallow(<Schema schema={schema} />);
|
||||
expect(toJson(schemaView)).toMatchSnapshot();
|
||||
const schemaViewElement = shallow(<Schema schema={schema} />).getElement();
|
||||
expect(schemaViewElement.type).toEqual(ObjectSchema);
|
||||
expect(schemaViewElement.props.discriminator).toBeDefined();
|
||||
expect(schemaViewElement.props.discriminator.parentSchema).toBeDefined();
|
||||
expect(schemaViewElement.props.discriminator.fieldName).toEqual('type');
|
||||
});
|
||||
|
||||
it('should correctly render discriminator dropdown', () => {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user