Skip to content

Commit

Permalink
fix(801) - remove bit more noise from jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Feb 19, 2024
1 parent 6798f56 commit 334b3c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/components/Form/schema.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('SchemaService', () => {
name: { $ref: 'invalid' },
},
};

jest.spyOn(console, 'error').mockImplementation(() => null);
expect(() => schemaService.getSchemaBridge(schema)).not.toThrow();
});

Expand All @@ -45,7 +45,7 @@ describe('SchemaService', () => {
};
const schemaBridge = schemaService.getSchemaBridge(schema);
const validator = schemaBridge?.validator;

jest.spyOn(console, 'error').mockImplementation(() => null);
expect(() => validator!({})).not.toThrow();
expect(validator!({})).toBeNull();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const wrapper = ({ children }: PropsWithChildren) => <EntitiesProvider>{children

describe('useEntityContext', () => {
it('should be throw when use hook without provider', () => {
jest.spyOn(console, 'error').mockImplementationOnce(() => null);
jest.spyOn(console, 'error').mockImplementation(() => null);
expect(() => renderHook(() => useEntityContext())).toThrow(errorMessage);
});

Expand Down

0 comments on commit 334b3c7

Please sign in to comment.