Removed test cases for the old default on reducers switch statements

This commit is contained in:
Alejandro Celaya 2019-03-17 10:17:44 +01:00
parent 232c059e4f
commit d1c10e4895
10 changed files with 0 additions and 52 deletions

View file

@ -9,9 +9,6 @@ import { RESET_SHORT_URL_PARAMS } from '../../../src/short-urls/reducers/shortUr
describe('selectedServerReducer', () => {
describe('reducer', () => {
it('returns default when action is not handled', () =>
expect(reducer(null, { type: 'unknown' })).toEqual(null));
it('returns default when action is RESET_SELECTED_SERVER', () =>
expect(reducer(null, { type: RESET_SELECTED_SERVER })).toEqual(null));

View file

@ -24,9 +24,6 @@ describe('serverReducer', () => {
describe('reducer', () => {
it('returns servers when action is FETCH_SERVERS', () =>
expect(reducer({}, { type: FETCH_SERVERS, payload })).toEqual(payload));
it('returns default when action is unknown', () =>
expect(reducer({}, { type: 'unknown' })).toEqual({}));
});
describe('action creators', () => {

View file

@ -39,9 +39,6 @@ describe('shortUrlCreationReducer', () => {
error: false,
});
});
it('returns provided state on unknown action', () =>
expect(reducer({}, { type: 'unknown' })).toEqual({}));
});
describe('resetCreateShortUrl', () => {

View file

@ -45,12 +45,6 @@ describe('shortUrlDeletionReducer', () => {
errorData,
});
});
it('returns provided state as is on unknown action', () => {
const state = { foo: 'bar' };
expect(reducer(state, { type: 'unknown' })).toEqual(state);
});
});
describe('resetDeleteShortUrl', () => {

View file

@ -70,12 +70,6 @@ describe('shortUrlsListReducer', () => {
},
});
});
it('returns provided state as is on unknown action', () => {
const state = { foo: 'bar' };
expect(reducer(state, { type: 'unknown' })).toEqual(state);
});
});
describe('listShortUrls', () => {

View file

@ -8,9 +8,6 @@ describe('shortUrlsListParamsReducer', () => {
describe('reducer', () => {
const defaultState = { page: '1' };
it('returns default value when action is unknown', () =>
expect(reducer(defaultState, { type: 'unknown' })).toEqual(defaultState));
it('returns params when action is LIST_SHORT_URLS', () =>
expect(reducer(defaultState, { type: LIST_SHORT_URLS, params: { searchTerm: 'foo' } })).toEqual({
...defaultState,

View file

@ -30,9 +30,6 @@ describe('tagDeleteReducer', () => {
error: false,
});
});
it('returns provided state on unknown action', () =>
expect(reducer({}, { type: 'unknown' })).toEqual({}));
});
describe('tagDeleted', () => {

View file

@ -32,9 +32,6 @@ describe('tagEditReducer', () => {
newName: 'bar',
});
});
it('returns provided state on unknown action', () =>
expect(reducer({}, { type: 'unknown' })).toEqual({}));
});
describe('tagEdited', () => {

View file

@ -32,17 +32,6 @@ describe('shortUrlDetailReducer', () => {
expect(error).toEqual(false);
expect(shortUrl).toEqual(actionShortUrl);
});
it('returns default state on unknown action', () => {
const defaultState = {
shortUrl: {},
loading: false,
error: false,
};
const state = reducer(defaultState, { type: 'unknown' });
expect(state).toEqual(defaultState);
});
});
describe('getShortUrlDetail', () => {

View file

@ -49,17 +49,6 @@ describe('shortUrlVisitsReducer', () => {
expect(error).toEqual(false);
expect(visits).toEqual(actionVisits);
});
it('returns default state on unknown action', () => {
const defaultState = {
visits: [],
loading: false,
error: false,
};
const state = reducer(defaultState, { type: 'unknown' });
expect(state).toEqual(defaultState);
});
});
describe('getShortUrlVisits', () => {