mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-13 12:26:34 +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',
|
'#/components/schemas/Pet',
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
const schemaView = shallow(<Schema schema={schema} />);
|
const schemaViewElement = shallow(<Schema schema={schema} />).getElement();
|
||||||
expect(toJson(schemaView)).toMatchSnapshot();
|
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', () => {
|
it('should correctly render discriminator dropdown', () => {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user