Closed tjenkinson closed 4 years ago
I can find out the version on Monday when I have access to the device again.
How should I test this? We need to force adding the implementation, which I didn't see done anywhere else
FYI I opened a related PR on typescript here: https://github.com/microsoft/TypeScript/pull/32643
I mean we want a test that tests
But that code only executes based on some of the other conditions
It's Opera 9.8
@tjenkinson thanks!
As for a test, anything that invokes .splice
and omits deleteCount
seems like it would test this change?
But it would only test the change on something that has one of these issues right?
https://github.com/es-shims/es5-shim/blob/e11b3f7be2ca1e87399478ba02553e110e5759fa/es5-shim.js#L881
Would the tests run on a browser old enough to have these issues?
CI won't, but I can manually run them against that version of Opera :-)
hi @ljharb any chance this could be merged soon?
Hmm, looks like the oldest Opera I can test in is 10.6, but the test seems to fail there.
It seems tho, like your fix ends up causing 2 additional failures that weren't there before.
:/ Which tests failed for you?
should return right result 3
Expected [ '~0', '~ 1', '~ 2', 'F1', 'P', 'LLL', 'CCC', 'YYY', 'XXX', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 1, 23, 4, 5, 6, 7, 8, '~ 4', '~ 5', '~ 6', '~ 7', 7, 8, 9, 10, 11, 2, 4, 5, 6, 7, 8, 9, 'CCC', 'YYY', 'XXX', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 1, 23, 4, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3 ] to equal [ '~0', '~ 1', '~ 2', 'F1', 'P', 'LLL', 'CCC', 'YYY', 'XXX', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 1, 23, 4, 5, 6, 7, 8, '~ 4', '~ 5', '~ 6', '~ 7', 7, 8, 9, 10, 11, 2, 4, 5, 6, 7, 8, 9, 'CCC', 'YYY', 'XXX', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 1, 23, 4, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'YYY', 'XXX', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 3, 4, 5, 6, 7, 8, 9, '-0', '- 1', '- 2', '- 3', '- 4', '- 5', '- 6', '- 7', 1, 2, 3 ].
run
should do nothing if method called with no arguments
Expected [ 1, 'a', [ 'b' ] ] to equal [ ].
Expected [ ] to equal [ 1, 'a', [ 'b' ] ].
@tjenkinson i know it's been awhile, but is there any chance you're interested in completing this PR?
@ljharb I am, but I'm not sure when I'm going to get time at the moment. Will close for now and maybe reopen later
I'd rather keep it open in the meantime so I can track it :-) please return to it when you get time.
@ljharb I am seeing a lot of failures like this, even on master
32) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
33) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
34) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
35) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
36) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
37) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
38) Date #getSeconds() should return the right value for negative dates
Message:
Expected 55 to be 59.
Stacktrace:
Error: Expected 55 to be 59.
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:469:47
at Array.forEach (<anonymous>)
at /Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:468:28
at Array.forEach (<anonymous>)
at jasmine.Spec.<anonymous> (/Users/tomjenkinson/Documents/GitHub/es5-shim/tests/spec/s-date.js:467:26)
any idea why?
In Opera specifically? Which version, I can probably fix those.
This is just from running npm test
on e938fda
On which node version? travis-ci passes on a great many node versions: https://travis-ci.com/es-shims/es5-shim/builds/143354113
v11.13.0
https://travis-ci.com/es-shims/es5-shim/jobs/272983149 passes, i'll try locally.
Weird. I wonder if it's related to my timezone somehow? I'm GMT+0100 (Central European Standard Time)
at the moment
interesting, i see those failures locally too, and i'm in UTC-7
Ah when I change my timezone to London I get Error: Expected 44 to be 59.
, so it looks like it's having an effect
hopefully with the last few commits the tests will be fixed now 🤞
It appears that old v8, old spidermonkey, jsc, and xs all print out 59
for this test; new v8, new spidermonkey, and chakra all print out 1
, so i'm looking into whether it's a spec change, or a browser bug.
Are you referring to the date test or splice?
The date test :-) i'll take a look at your splice changes soon.
bump!
OK, with your test but without your fix, Opera 10.6 has 10 failures; with your fix, it has 8, none of which are related to splice. Let's get this in :-)
:tada: thanks
In Opera 10.6 and 9.8, when the fix is applied and
deleteCount
is missing, no elements are deleted. This is incorrect - whendeleteCount
is missing the behavior should be to delete all elements fromstart
onwards