Uninstalled jest-each and replaced by jest's native each

This commit is contained in:
Alejandro Celaya
2020-02-17 18:21:52 +01:00
parent da54a72b3e
commit d0f458bece
15 changed files with 30 additions and 45 deletions

View File

@@ -1,7 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import { identity } from 'ramda';
import each from 'jest-each';
import DeleteShortUrlModal from '../../../src/short-urls/helpers/DeleteShortUrlModal';
describe('<DeleteShortUrlModal />', () => {
@@ -32,7 +31,7 @@ describe('<DeleteShortUrlModal />', () => {
deleteShortUrl.mockClear();
});
each([
it.each([
[
{ error: 'INVALID_SHORTCODE_DELETION' },
'This short URL has received too many visits, and therefore, it cannot be deleted.',
@@ -49,7 +48,7 @@ describe('<DeleteShortUrlModal />', () => {
{ type: 'INVALID_SHORTCODE_DELETION', threshold: 8 },
'This short URL has received more than 8 visits, and therefore, it cannot be deleted.',
],
]).it('shows threshold error message when threshold error occurs', (errorData, expectedMessage) => {
])('shows threshold error message when threshold error occurs', (errorData, expectedMessage) => {
const wrapper = createWrapper({
loading: false,
error: true,