Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

72 unit tests now fail when running tests-only in Node 20-22 #3

Open
jdalton opened this issue Sep 15, 2024 · 4 comments
Open

72 unit tests now fail when running tests-only in Node 20-22 #3

jdalton opened this issue Sep 15, 2024 · 4 comments

Comments

@jdalton
Copy link

jdalton commented Sep 15, 2024

72 unit tests now fail when running tests-only in Node 20-22.

Related to https://github.com/es-shims/Date/blob/v2.0.5/test/Date/tests.js#L216

st.match(i + ':' + date.getSeconds(), new RegExp(i + ':(?:' + 59 + '|' + 1 + ')'))

If changed to

st.match(i + ':' + date.getSeconds(), new RegExp(i + ':(?:' + 57 + '|' + 1 + ')'))

all the tests then pass

@ljharb
Copy link
Member

ljharb commented Sep 24, 2024

I'm not seeing that in node v22.9.0 or v20.17.0. Is there a chance it's OS-dependent, or that they're flaky?

@jdalton
Copy link
Author

jdalton commented Oct 3, 2024

Hmm on my v22.9.0 (via nvm) with the latest main branch. I still see it. I'm on MacOS Sonoma 14.6.1.

@ljharb
Copy link
Member

ljharb commented Oct 3, 2024

Perhaps it's the Mac OS; I'm on 14.6.1 now (and probably wasn't before), and i get 144 failures all being off by a ms or so. I'm also in a very different timezone than I was last week, which may factor in.

The UTC time it's ran may matter too - in particular, I've often run into time bugs during the daily window where the local timezone and UTC timezone are on different dates.

@ljharb
Copy link
Member

ljharb commented Oct 3, 2024

I've narrowed down the failures I'm seeing right now to:

  • 48 "implementation" failures, the majority of which are about getting 60 where 59 is expected
  • 2 "builtin" failures in node v22.9:
# is an invalid date
not ok 1 2012-11-31T23:59:59.000Z is an invalid date
  ---
    operator: equal
    expected: NaN
    actual:   1354406399000
    at: <anonymous> ($PWD/test/Date.parse/tests.js:24:7)
    stack: |-
      Error: 2012-11-31T23:59:59.000Z is an invalid date
          at Test.assert [as _assert] ($PWD/node_modules/tape/lib/test.js:492:48)
          at Test.strictEqual ($PWD/node_modules/tape/lib/test.js:670:7)
          at $PWD/test/Date.parse/tests.js:24:7
          at forEachArray ($PWD/node_modules/for-each/index.js:12:17)
          at forEach ($PWD/node_modules/for-each/index.js:54:9)
          at Test.<anonymous> ($PWD/test/Date.parse/tests.js:23:3)
          at Test.run ($PWD/node_modules/tape/lib/test.js:126:28)
          at Test._end ($PWD/node_modules/tape/lib/test.js:398:5)
          at Test.end ($PWD/node_modules/tape/lib/test.js:211:7)
          at Test.<anonymous> ($PWD/test/Date.parse/builtin.js:10:4)
  ...
not ok 13 2011-02-29T12:00:00.000Z is an invalid date
  ---
    operator: equal
    expected: NaN
    actual:   1298980800000
    at: <anonymous> ($PWD/test/Date.parse/tests.js:24:7)
    stack: |-
      Error: 2011-02-29T12:00:00.000Z is an invalid date
          at Test.assert [as _assert] ($PWD/node_modules/tape/lib/test.js:492:48)
          at Test.strictEqual ($PWD/node_modules/tape/lib/test.js:670:7)
          at $PWD/test/Date.parse/tests.js:24:7
          at forEachArray ($PWD/node_modules/for-each/index.js:12:17)
          at forEach ($PWD/node_modules/for-each/index.js:54:9)
          at Test.<anonymous> ($PWD/test/Date.parse/tests.js:23:3)
          at Test.run ($PWD/node_modules/tape/lib/test.js:126:28)
          at Test._end ($PWD/node_modules/tape/lib/test.js:398:5)
          at Test.end ($PWD/node_modules/tape/lib/test.js:211:7)
          at Test.<anonymous> ($PWD/test/Date.parse/builtin.js:10:4)
  ...

The builtin failures I think are already covered in polyfill, but the implementation failures are tricky because I think it's important to confirm whether these failures are due to web reality/es5-shim/es6-shim tests, or due to the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants