1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00
unleash.unleash/frontend/src/utils/format-unknown-error.test.ts
olav f4d5ed03aa refactor: port auth admin to TS/SWR (#675)
* refactor: format files

* refactor: add missing RE UI config flag

* refactor: port admin auth index to TS/SWR

* refactor: port GoogleAuth to TS/SWR

* refactor: port OidcAuth to TS/SWR

* refactor: port SamlAuth to TS/SWR

* refactor: remove unused e-admin-auth store

* refactor: make AutoCreateForm an explicit export

* refactor: improve auth settings dir structure

* refactor: destructure authenticationType from uiConfig

* refactor: use setToastApiError to show errors

* refactor: format files

* refactor: remove invalid string fields from requests

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-02-08 11:44:41 +01:00

9 lines
334 B
TypeScript

import { formatUnknownError } from './format-unknown-error';
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');
});