Skip to content

Commit

Permalink
tests: rewrite test to not use useless snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Jan 30, 2018
1 parent a6ae43a commit a7e9254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1,008 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Loading

0 comments on commit a7e9254

Please sign in to comment.