mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
16 lines
692 B
TypeScript
16 lines
692 B
TypeScript
import { fromPartial } from '@total-typescript/shoehorn';
|
|
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
|
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
|
import type { Visit } from '../../../shlink-web-component/visits/types';
|
|
|
|
describe('visitCreationReducer', () => {
|
|
describe('createNewVisits', () => {
|
|
const shortUrl = fromPartial<ShortUrl>({});
|
|
const visit = fromPartial<Visit>({});
|
|
|
|
it('just returns the action with proper type', () => {
|
|
const { payload } = createNewVisits([{ shortUrl, visit }]);
|
|
expect(payload).toEqual({ createdVisits: [{ shortUrl, visit }] });
|
|
});
|
|
});
|
|
});
|