mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +00:00
Migrated visits-loading actions to payload actions
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
import { Action } from 'redux';
|
||||
import { buildActionCreator, buildReducer } from '../../../src/utils/helpers/redux';
|
||||
import { buildReducer } from '../../../src/utils/helpers/redux';
|
||||
|
||||
describe('redux', () => {
|
||||
beforeEach(jest.clearAllMocks);
|
||||
|
||||
describe('buildActionCreator', () => {
|
||||
it.each([
|
||||
['foo', { type: 'foo' }],
|
||||
['bar', { type: 'bar' }],
|
||||
['something', { type: 'something' }],
|
||||
])('returns an action creator', (type, expected) => {
|
||||
const actionCreator = buildActionCreator(type);
|
||||
|
||||
expect(actionCreator).toBeInstanceOf(Function);
|
||||
expect(actionCreator()).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('buildReducer', () => {
|
||||
const fooActionHandler = jest.fn(() => 'foo result');
|
||||
const barActionHandler = jest.fn(() => 'bar result');
|
||||
|
||||
Reference in New Issue
Block a user