-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Node/V8 currently disagrees with 6 Date.parse tests. #4
Comments
I see only 2 failures in latest node: 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)
... with builtin.js: 'use strict';
var test = require('tape');
var runTests = require('./tests');
test('builtin', function (t) {
runTests(Date.parse, t);
t.end();
}); |
(notably, these two dates do fail in Safari, but pass in Firefox) |
Thanks for digging in and showing the example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just a heads up that builtin Date.parse of Node 20/22 fails 6 unit tests in Date.parse. I'm not sure if it's a bug on them or the shim. Just raising awareness of the differences.
needsConstructor
check V8 will fail one check for allowing invalid dates:Date.parse('2012-11-31T23:59:59.000Z')
The text was updated successfully, but these errors were encountered: