From df121eb294af4be8efab3f56aa2d379c30f9a3cc Mon Sep 17 00:00:00 2001 From: Haocen Xu Date: Sun, 15 Sep 2019 09:14:00 -0400 Subject: [PATCH] Fix an inaccurate variable name in test --- test/short-urls/ShortUrlsList.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/short-urls/ShortUrlsList.test.js b/test/short-urls/ShortUrlsList.test.js index 4a5505ac..b2d21a65 100644 --- a/test/short-urls/ShortUrlsList.test.js +++ b/test/short-urls/ShortUrlsList.test.js @@ -84,7 +84,7 @@ describe('', () => { for (const sortableField of Object.getOwnPropertyNames(SORTABLE_FIELDS)) { wrapper.setState({ orderField: sortableField, orderDir: undefined }); - const [ dateCreatedThElement ] = wrapper.find('table').shallow() + const [ sortableThElement ] = wrapper.find('table').shallow() .find('thead').shallow() .find('tr').shallow() .find('th') @@ -93,13 +93,13 @@ describe('', () => { e.text().includes(SORTABLE_FIELDS[sortableField]) ); - const dateCreatedThElementWrapper = shallow(dateCreatedThElement); + const sortableThElementWrapper = shallow(sortableThElement); - expect(dateCreatedThElementWrapper.find(FontAwesomeIcon)).toHaveLength(0); + expect(sortableThElementWrapper.find(FontAwesomeIcon)).toHaveLength(0); for (const orderDir of Object.getOwnPropertyNames(orderDirOptionToIconMap)) { wrapper.setState({ orderField: sortableField, orderDir }); - const [ dateCreatedThElement ] = wrapper.find('table').shallow() + const [ sortableThElement ] = wrapper.find('table').shallow() .find('thead').shallow() .find('tr').shallow() .find('th') @@ -108,11 +108,11 @@ describe('', () => { e.text().includes(SORTABLE_FIELDS[sortableField]) ); - const dateCreatedThElementWrapper = shallow(dateCreatedThElement); + const sortableThElementWrapper = shallow(sortableThElement); - expect(dateCreatedThElementWrapper.find(FontAwesomeIcon)).toHaveLength(1); + expect(sortableThElementWrapper.find(FontAwesomeIcon)).toHaveLength(1); expect( - dateCreatedThElementWrapper.find(FontAwesomeIcon).prop('icon') + sortableThElementWrapper.find(FontAwesomeIcon).prop('icon') ).toEqual(orderDirOptionToIconMap[orderDir]); } }