changing tests. removing importData func

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-11-25 23:05:10 +03:00
committed by Daniel Hutzel
parent 029ba61098
commit a04cc0c25f
10 changed files with 241 additions and 600 deletions

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@@ -30,8 +30,8 @@ const InvoicePage = () => {
const { handleError } = useErrors();
const { user, invoicedItems, setInvoicedItems, setLoading } = useAppState();
const data = invoicedItems.map(({ ID: key, ...otherProps }) => ({
key,
const data = invoicedItems.map(({ ID, ...otherProps }) => ({
key: `invoiceItem${ID}`,
...otherProps,
}));