refactor: Accept unknown in errorToConsole to drop as Error casts (#2541)
This commit is contained in:
committed by
dermotduffy
parent
fcef48e75a
commit
95f35bd326
@@ -114,6 +114,11 @@ describe('errorToConsole', () => {
|
||||
errorToConsole('string message');
|
||||
expect(spy).toHaveBeenCalledWith('string message');
|
||||
});
|
||||
it('should do nothing given a falsy value', () => {
|
||||
spy.mockClear();
|
||||
errorToConsole(null);
|
||||
expect(spy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
Reference in New Issue
Block a user