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
$ TZ="UTC" npm run test -- --no-cache --force
happy-dom:test: Test Files 89 passed (89)
happy-dom:test: Tests 2344 passed (2344)
$ TZ="US/Pacific" npm run test -- --no-cache --force
happy-dom:test: FAIL test/nodes/html-input-element/HTMLInputDateUtility.test.ts > HTMLInputElementDateUtility > dateToIsoWeek() > Returns the ISO week number
happy-dom:test: AssertionError: expected '2021-W02' to be '2021-W01' // Object.is equality
happy-dom:test: FAIL test/nodes/html-input-element/HTMLInputDateUtility.test.ts > HTMLInputElementDateUtility > IsoWeekToDate() > Returns the ISO week number
happy-dom:test: AssertionError: expected 2020-12-29T00:00:00.000Z to deeply equal 2020-12-28T00:00:00.000Z
happy-dom:test: FAIL test/nodes/html-input-element/HTMLInputElement.test.ts > HTMLInputElement > get valueAsDate() > Should return valid date for type 'week' with valid value
happy-dom:test: AssertionError: expected 2023-05-30T00:00:00.000Z to deeply equal 2023-05-29T00:00:00.000Z
Describe the bug
At https://github.com/capricorn86/happy-dom/blob/master/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementDateUtility.ts#L17-L19,
date.getDay()
is dependent on the timezone of the machine. The results are inconsistent.To Reproduce
Steps to reproduce the behavior:
To reproduce the root cause:
Expected behavior
Tests should pass anywhere in the world.
Screenshots
If applicable, add screenshots to help explain your problem.
Device:
Latest version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: