Skip to content

Commit

Permalink
#17 Specify jest environment for all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Jul 27, 2020
1 parent 8b7e73b commit b0d70f0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/__tests__/editprofile.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { render, wait } from '@testing-library/react';
import EditProfile from '../pages/user/[slug]/editprofile';

Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/index.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/newuser.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { render, wait } from '@testing-library/react';
import NewUser from '../pages/user/newuser';

Expand Down
4 changes: 4 additions & 0 deletions src/components/Alerts/Alerts.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { render } from '@testing-library/react';
import { mockNextUseRouter } from '../../utils/testUtil.ts';
import Alerts from './Alerts';
Expand Down
4 changes: 4 additions & 0 deletions src/components/Footer/Footer.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { render } from '@testing-library/react';
import Footer from './Footer';

Expand Down
4 changes: 4 additions & 0 deletions src/components/Header/Header.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { render, wait } from '@testing-library/react';
import Header from './Header';

Expand Down
4 changes: 4 additions & 0 deletions src/components/Layout/Layout.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit b0d70f0

Please sign in to comment.