This is a Next.js template to use when reporting a bug in the Next.js repository.
These are the steps you should follow when creating a bug report:
- Bug reports must be verified against the
next@canary
release. The canary version of Next.js ships daily and includes all features and fixes that have not been released to the stable version yet. Think of canary as a public beta. Some issues may already be fixed in the canary version, so please verify that your issue reproduces before opening a new issue. Issues not verified againstnext@canary
will be closed after 30 days. - Make sure your issue is not a duplicate. Use the GitHub issue search to see if there is already an open issue that matches yours. If that is the case, upvoting the other issue's first comment is desireable as we often prioritize issues based on the number of votes they receive. Note: Adding a "+1" or "same issue" comment without adding more context about the issue should be avoided. If you only find closed related issues, you can link to them using the issue number and
#
, eg.:I found this related issue: #3000
. - If you think the issue is not in Next.js, the best place to ask for help is our Discord community or GitHub discussions. Our community is welcoming and can often answer a project-related question faster than the Next.js core team.
- Make the reproduction as minimal as possible. Try to exclude any code that does not help reproducing the issue. E.g. if you experience problems with Routing, including ESLint configurations or API routes aren't necessary. The less lines of code is to read through, the easier it is for the Next.js team to investigate. It may also help catching bugs in your codebase before publishing an issue.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- How to Contribute to Open Source (Next.js) - a video tutorial by Lee Robinson
- Triaging in the Next.js repository - how we work on issues
- StackBlitz - Edit this repository on StackBlitz
- CodeSandbox - Edit this repository on CodeSandbox
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
If your reproduction needs to be deployed, the easiest way is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Clone repo and install
pnpm install
pnpm jest-babel-all
pnpm jest-babel-all-w1
pnpm jest-babel-all-w2
pnpm jest-babel-all-i
pnpm jest-babel-one
pnpm jest-next-all
pnpm jest-next-one
pnpm jest-next-all-w1
pnpm jest-next-all-w2
pnpm jest-next-all-i
> @ jest-babel-all C:\Code\zzTesting\jest-next-time-zone-issue
> jest --no-cache --config ./jest.config.babel.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.426 s
Ran all test suites.
> @ jest-babel-all-w1 C:\Code\zzTesting\jest-next-time-zone-issue
> jest -w 1 --no-cache --config ./jest.config.babel.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 0.582 s
Ran all test suites.
> @ jest-babel-all-w2 C:\Code\zzTesting\jest-next-time-zone-issue
> jest -w 2--no-cache --config ./jest.config.babel.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 0.692 s, estimated 1 s
Ran all test suites.
> @ jest-babel-all-i C:\Code\zzTesting\jest-next-time-zone-issue
> jest -i --no-cache --config ./jest.config.babel.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 0.862 s
Ran all test suites.
> @ jest-babel-one C:\Code\zzTesting\jest-next-time-zone-issue
> jest --no-cache --config ./jest.config.babel.js lib/formatDate.test.ts
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/formatDate.test.ts
ISO Date
√ returns correct hour value (30 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.531 s
Ran all test suites matching /lib\\formatDate.test.ts/i.
> @ jest-next-all C:\Code\zzTesting\jest-next-time-zone-issue
> jest --no-cache --config ./jest.config.next.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.433 s
Ran all test suites.
> @ jest-next-one C:\Code\zzTesting\jest-next-time-zone-issue
> jest --no-cache --config ./jest.config.next.js lib/formatDate.test.ts
console.log
Timezone Offset: -600
at Object.log (lib/formatDate.test.ts:8:13)
FAIL lib/formatDate.test.ts
ISO Date
× returns correct hour value (32 ms)
● ISO Date › returns correct hour value
expect(received).toBe(expected) // Object.is equality
Expected: 13
Received: 23
8 | console.log(`Timezone Offset: ${new Date().getTimezoneOffset()}`);
9 |
> 10 | expect(new Date(date).getHours()).toBe(13);
| ^
11 | });
12 | });
13 |
at Object.toBe (lib/formatDate.test.ts:10:39)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.525 s
Ran all test suites matching /lib\\formatDate.test.ts/i.
ELIFECYCLE Command failed with exit code 1.
Run with --maxWorkers=1
> @ jest-next-all-w1 C:\Code\zzTesting\jest-next-time-zone-issue
> jest -w 1 --no-cache --config ./jest.config.next.js
FAIL lib/formatDate.test.ts
● Console
console.log
Timezone Offset: -600
at Object.log (lib/formatDate.test.ts:8:13)
● ISO Date › returns correct hour value
expect(received).toBe(expected) // Object.is equality
Expected: 13
Received: 23
8 | console.log(`Timezone Offset: ${new Date().getTimezoneOffset()}`);
9 |
> 10 | expect(new Date(date).getHours()).toBe(13);
| ^
11 | });
12 | });
13 |
at Object.toBe (lib/formatDate.test.ts:10:39)
PASS lib/randomFile.test.ts
Test Suites: 1 failed, 1 passed, 2 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 0.633 s
Ran all test suites.
ELIFECYCLE Command failed with exit code 1.
Run with --maxWorkers=2
> @ jest-next-all-w2 C:\Code\zzTesting\jest-next-time-zone-issue
> jest -w 2 --no-cache --config ./jest.config.next.js
PASS lib/formatDate.test.ts
● Console
console.log
Timezone Offset: 0
at Object.log (lib/formatDate.test.ts:8:13)
PASS lib/randomFile.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.256 s
Ran all test suites.
Run with --runInBand
> @ jest-next-all-i C:\Code\zzTesting\jest-next-time-zone-issue
> jest -i --no-cache --config ./jest.config.next.js
FAIL lib/formatDate.test.ts
● Console
console.log
Timezone Offset: -600
at Object.log (lib/formatDate.test.ts:8:13)
● ISO Date › returns correct hour value
expect(received).toBe(expected) // Object.is equality
Expected: 13
Received: 23
8 | console.log(`Timezone Offset: ${new Date().getTimezoneOffset()}`);
9 |
> 10 | expect(new Date(date).getHours()).toBe(13);
| ^
11 | });
12 | });
13 |
at Object.toBe (lib/formatDate.test.ts:10:39)
PASS lib/randomFile.test.ts
Test Suites: 1 failed, 1 passed, 2 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 0.638 s
Ran all test suites.
ELIFECYCLE Command failed with exit code 1.