You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are you deploying your application? (if relevant)
No response
Describe the Bug
When running the tests with the example out of the box, two tests fail.
FAIL__tests__/index.test.tsx●TestsuitefailedtorunCannotfindmodule 'pages/index' from '__tests__/index.test.tsx'
7|describe('Home',()=>{8|it('renders a heading',()=>{>9|render(<Home/>)|^10|11|constheading=screen.getByRole('heading',{12|name: /welcome to next\.js!/i,atResolver._throwModNotFoundError(node_modules/jest-resolve/build/resolver.js:427:11)atObject.<anonymous>(__tests__/index.test.tsx:9:55)
And
FAIL__tests__/snapshot.tsx●TestsuitefailedtorunCannotfindmodule 'pages/index' from '__tests__/snapshot.tsx'
7|it('renders homepage unchanged',()=>{8|const{ container }=render(<Home/>)>9|expect(container).toMatchSnapshot()|^10|})11|atResolver._throwModNotFoundError(node_modules/jest-resolve/build/resolver.js:427:11)atObject.<anonymous>(__tests__/snapshot.tsx:9:55)
I we implement these changes in these files, the tests pass: /__tests__/index.test.tsx
- import Home from '@/pages/index';+ import Home from '@/pages/home/index';
`tests/snapshot.tsx``
- import Home from '@/pages/index';+ import Home from '@/pages/home/index'### Expected Behavior
Tests pass when running them after creating the project.
### To Reproduce
```console
npx create-next-app --example with-jest test
npm run test:ci
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 Binaries: Node: 20.9.0 npm: 10.1.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.0.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.3.3 Next.js Config: output: N/A
Which example does this report relate to?
with-jest
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
When running the tests with the example out of the box, two tests fail.
And
I we implement these changes in these files, the tests pass:
/__tests__/index.test.tsx
`tests/snapshot.tsx``
The text was updated successfully, but these errors were encountered: