shlink-web-client/test/visits/reducers/visitCreation.test.ts
2020-08-27 17:56:48 +02:00

16 lines
579 B
TypeScript

import { Mock } from 'ts-mockery';
import { CREATE_VISIT, createNewVisit } from '../../../src/visits/reducers/visitCreation';
import { ShortUrl } from '../../../src/short-urls/data';
import { Visit } from '../../../src/visits/types';
describe('visitCreationReducer', () => {
describe('createNewVisit', () => {
const shortUrl = Mock.all<ShortUrl>();
const visit = Mock.all<Visit>();
it('just returns the action with proper type', () =>
expect(createNewVisit({ shortUrl, visit })).toEqual(
{ type: CREATE_VISIT, shortUrl, visit },
));
});
});