mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
f4d5ed03aa
* 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>
9 lines
334 B
TypeScript
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');
|
|
});
|