From 34abbf60bbeec9befa9cd4c5194e9dc1705c7e65 Mon Sep 17 00:00:00 2001 From: Kwakcena Date: Thu, 7 Jan 2021 00:48:17 +0900 Subject: [PATCH] Fix lint error * lint error fix --- src/components/presentational/ProductDetail.test.jsx | 8 ++++---- src/services/api.test.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/presentational/ProductDetail.test.jsx b/src/components/presentational/ProductDetail.test.jsx index ae05076..9d0790d 100644 --- a/src/components/presentational/ProductDetail.test.jsx +++ b/src/components/presentational/ProductDetail.test.jsx @@ -5,7 +5,6 @@ import { render, fireEvent } from '@testing-library/react'; import ProductDetail from './ProductDetail'; import products from '../../../fixtures/products'; -import product from '../../../fixtures/product'; describe('ProductDetail', () => { function renderProductDetail({ product }) { @@ -17,10 +16,11 @@ describe('ProductDetail', () => { } it('renders product detail', () => { - const { container } = renderProductDetail({ product }); + const { title, region } = products[0]; + const { container } = renderProductDetail({ product: products[0] }); - expect(container).toHaveTextContent(product.title); - expect(container).toHaveTextContent(product.region); + expect(container).toHaveTextContent(title); + expect(container).toHaveTextContent(region); }); context('without product images', () => { diff --git a/src/services/api.test.js b/src/services/api.test.js index 970419e..6de8c5c 100644 --- a/src/services/api.test.js +++ b/src/services/api.test.js @@ -74,7 +74,7 @@ describe('api', () => { const data = await uploadProductImages({ files }); - const productImages = files.map((file, _) => ({ + const productImages = files.map((file) => ({ name: file.name, imageUrl: 'MOCK_IMAGE_URL', }));