1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/frontend/src/utils/formatUnknownError.test.ts

9 lines
336 B
TypeScript

import { formatUnknownError } from 'utils/formatUnknownError';
test('formatUnknownError', () => {
expect(formatUnknownError(1)).toEqual('Unknown error');
expect(formatUnknownError('1')).toEqual('1');
expect(formatUnknownError(new Error('1'))).toEqual('1');
expect(formatUnknownError(new Error())).toEqual('Error');
});