mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 05:36:38 +00:00
Get dependency on uuid package back to fix error on non-secure contexts
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
selectedServerReducerCreator,
|
||||
selectServer as selectServerCreator,
|
||||
} from '../../../src/servers/reducers/selectedServer';
|
||||
import { randomUUID } from '../../../src/utils/utils';
|
||||
|
||||
describe('selectedServerReducer', () => {
|
||||
const dispatch = vi.fn();
|
||||
@@ -40,7 +41,7 @@ describe('selectedServerReducer', () => {
|
||||
['latest', MAX_FALLBACK_VERSION, 'latest'],
|
||||
['%invalid_semver%', MIN_FALLBACK_VERSION, '%invalid_semver%'],
|
||||
])('dispatches proper actions', async (serverVersion, expectedVersion, expectedPrintableVersion) => {
|
||||
const id = crypto.randomUUID();
|
||||
const id = randomUUID();
|
||||
const getState = createGetStateMock(id);
|
||||
const expectedSelectedServer = {
|
||||
id,
|
||||
@@ -59,7 +60,7 @@ describe('selectedServerReducer', () => {
|
||||
});
|
||||
|
||||
it('dispatches error when health endpoint fails', async () => {
|
||||
const id = crypto.randomUUID();
|
||||
const id = randomUUID();
|
||||
const getState = createGetStateMock(id);
|
||||
const expectedSelectedServer = fromPartial<NonReachableServer>({ id, serverNotReachable: true });
|
||||
|
||||
@@ -72,7 +73,7 @@ describe('selectedServerReducer', () => {
|
||||
});
|
||||
|
||||
it('dispatches error when server is not found', async () => {
|
||||
const id = crypto.randomUUID();
|
||||
const id = randomUUID();
|
||||
const getState = vi.fn(() => fromPartial<ShlinkState>({ servers: {} }));
|
||||
const expectedSelectedServer: NotFoundServer = { serverNotFound: true };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user