Skip to content

Commit

Permalink
Set jest environment in each file
Browse files Browse the repository at this point in the history
  • Loading branch information
htunnicliff committed Aug 25, 2021
1 parent 9b5d6d3 commit dd211d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/with-jest/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import React from 'react'
import { render, screen } from '@testing-library/react'
import Home from '../pages/index'
Expand Down
1 change: 0 additions & 1 deletion examples/with-jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
'^@/components/(.*)$': '<rootDir>/components/$1',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: "jsdom",
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.next/'],
transform: {
// Use babel-jest to transpile tests with the next/babel preset
Expand Down

0 comments on commit dd211d4

Please sign in to comment.