mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
Removed unnecessary castings to any
This commit is contained in:
parent
830071278e
commit
0f552ae6f4
1 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ describe('shortUrlDeletionReducer', () => {
|
||||||
|
|
||||||
describe('reducer', () => {
|
describe('reducer', () => {
|
||||||
it('returns loading on DELETE_SHORT_URL_START', () =>
|
it('returns loading on DELETE_SHORT_URL_START', () =>
|
||||||
expect(reducer(undefined, { type: deleteShortUrl.pending.toString() } as any)).toEqual({
|
expect(reducer(undefined, { type: deleteShortUrl.pending.toString() })).toEqual({
|
||||||
shortCode: '',
|
shortCode: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
error: false,
|
error: false,
|
||||||
|
@ -20,7 +20,7 @@ describe('shortUrlDeletionReducer', () => {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('returns default on RESET_DELETE_SHORT_URL', () =>
|
it('returns default on RESET_DELETE_SHORT_URL', () =>
|
||||||
expect(reducer(undefined, { type: resetDeleteShortUrl.toString() } as any)).toEqual({
|
expect(reducer(undefined, { type: resetDeleteShortUrl.toString() })).toEqual({
|
||||||
shortCode: '',
|
shortCode: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
error: false,
|
error: false,
|
||||||
|
@ -31,7 +31,7 @@ describe('shortUrlDeletionReducer', () => {
|
||||||
expect(reducer(undefined, {
|
expect(reducer(undefined, {
|
||||||
type: deleteShortUrl.fulfilled.toString(),
|
type: deleteShortUrl.fulfilled.toString(),
|
||||||
payload: { shortCode: 'foo' },
|
payload: { shortCode: 'foo' },
|
||||||
} as any)).toEqual({
|
})).toEqual({
|
||||||
shortCode: 'foo',
|
shortCode: 'foo',
|
||||||
loading: false,
|
loading: false,
|
||||||
error: false,
|
error: false,
|
||||||
|
@ -42,7 +42,7 @@ describe('shortUrlDeletionReducer', () => {
|
||||||
const errorData = Mock.of<ProblemDetailsError>({ type: 'bar' });
|
const errorData = Mock.of<ProblemDetailsError>({ type: 'bar' });
|
||||||
const error = { response: { data: errorData } };
|
const error = { response: { data: errorData } };
|
||||||
|
|
||||||
expect(reducer(undefined, { type: deleteShortUrl.rejected.toString(), error } as any)).toEqual({
|
expect(reducer(undefined, { type: deleteShortUrl.rejected.toString(), error })).toEqual({
|
||||||
shortCode: '',
|
shortCode: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
error: true,
|
error: true,
|
||||||
|
|
Loading…
Reference in a new issue