From b0d70f0b81ccdb3ec07957f6953a969daeacf136 Mon Sep 17 00:00:00 2001 From: Ben Silverman Date: Mon, 27 Jul 2020 17:32:01 -0400 Subject: [PATCH] #17 Specify jest environment for all tests --- src/__tests__/editprofile.test.js | 4 ++++ src/__tests__/index.test.js | 4 ++++ src/__tests__/newuser.test.js | 4 ++++ src/components/Alerts/Alerts.test.js | 4 ++++ src/components/Footer/Footer.test.js | 4 ++++ src/components/Header/Header.test.js | 4 ++++ src/components/Layout/Layout.test.js | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/__tests__/editprofile.test.js b/src/__tests__/editprofile.test.js index a7865550..9c2e2df8 100644 --- a/src/__tests__/editprofile.test.js +++ b/src/__tests__/editprofile.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { render, wait } from '@testing-library/react'; import EditProfile from '../pages/user/[slug]/editprofile'; diff --git a/src/__tests__/index.test.js b/src/__tests__/index.test.js index 82b5e8e3..f427e315 100644 --- a/src/__tests__/index.test.js +++ b/src/__tests__/index.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { act } from 'react-dom/test-utils'; import { render, wait } from '@testing-library/react'; import Index from '../pages/index'; diff --git a/src/__tests__/newuser.test.js b/src/__tests__/newuser.test.js index 65a8cfd8..e071783c 100644 --- a/src/__tests__/newuser.test.js +++ b/src/__tests__/newuser.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { render, wait } from '@testing-library/react'; import NewUser from '../pages/user/newuser'; diff --git a/src/components/Alerts/Alerts.test.js b/src/components/Alerts/Alerts.test.js index b12efc7b..1e1c6ab2 100644 --- a/src/components/Alerts/Alerts.test.js +++ b/src/components/Alerts/Alerts.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { render } from '@testing-library/react'; import { mockNextUseRouter } from '../../utils/testUtil.ts'; import Alerts from './Alerts'; diff --git a/src/components/Footer/Footer.test.js b/src/components/Footer/Footer.test.js index 0eb0da51..69296a14 100644 --- a/src/components/Footer/Footer.test.js +++ b/src/components/Footer/Footer.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { render } from '@testing-library/react'; import Footer from './Footer'; diff --git a/src/components/Header/Header.test.js b/src/components/Header/Header.test.js index 837973df..dad50c33 100644 --- a/src/components/Header/Header.test.js +++ b/src/components/Header/Header.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { render, wait } from '@testing-library/react'; import Header from './Header'; diff --git a/src/components/Layout/Layout.test.js b/src/components/Layout/Layout.test.js index d9161f5e..416db443 100644 --- a/src/components/Layout/Layout.test.js +++ b/src/components/Layout/Layout.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import { act } from 'react-dom/test-utils'; import { render, wait } from '@testing-library/react'; import Layout from './Layout';