diff --git a/examples/with-jest/__tests__/index.test.jsx b/examples/with-jest/__tests__/index.test.jsx index c908c8499ab54c5..b2fc240afb8f690 100644 --- a/examples/with-jest/__tests__/index.test.jsx +++ b/examples/with-jest/__tests__/index.test.jsx @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import React from 'react' import { render, screen } from '@testing-library/react' import Home from '../pages/index' diff --git a/examples/with-jest/jest.config.js b/examples/with-jest/jest.config.js index 7948f054c2d74bf..15c4717b8e12284 100644 --- a/examples/with-jest/jest.config.js +++ b/examples/with-jest/jest.config.js @@ -20,7 +20,6 @@ module.exports = { '^@/components/(.*)$': '/components/$1', }, setupFilesAfterEnv: ['/jest.setup.js'], - testEnvironment: "jsdom", testPathIgnorePatterns: ['/node_modules/', '/.next/'], transform: { // Use babel-jest to transpile tests with the next/babel preset