GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — test: replace indexOf with includes by gwer · Pull Request #12604 · nodejs/node Conversation
|
|
@gwer Looks good. But we're still discussing the implication of #12586, so it might take some time to land (or might even be rejected). But thank you very much for the effort! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
These should be updated to !propertyNames.includes() too so that the code is consistent.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to decouple changes to startsWith to a different PR. As far as I can see from the discussion in #12586, that PR won't be controversial like this one may potentially be :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I agree, all === 0 could be in a separate PR, and land easily.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Partly fixes nodejs#12586
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm -1 on this for the reasons I described in #12586. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI is green now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex ... can you use the "request changes" thing on here to put the big red X so folks don't miss your objection. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm -1 on this for the reasons I described in #12586.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex the @nodejs/lts have deceived that "theoretically test improvements wouldn't be backported to maintenance branches" will you be willing to lift your objection? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex at the last LTS meeting we agreed that test changes will not be backported (except in some once-in-a-blue-moon occasion where it's really crucial). Given that, do you still object? cc/ @nodejs/lts , does anyone have an issue with these changes landing now? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gibfahn It's not just general test changes (e.g. adding |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Test changes still need to be backport to v6.x
…On Apr 27, 2017 1:36 PM, "Brian White" ***@***.***> wrote:
@gibfahn <https://github.com/gibfahn> It's not just general test changes
(e.g. adding common.mustCall() in places) but even things like
non-semver-major changes that get backported that include tests (that may
use .includes()). I guess as long as whoever is backporting doesn't mind
having to change commit(s) for v4.x, then it's fine. Anyway, it seems I'm
in the minority here, so I say go ahead.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#12604 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAecV1aOe51sQVfSSHJ6mImzE3pcvlSTks5r0NIxgaJpZM4NFQYt>
.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@MylesBorins are |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Seems to work for me: > process.version 'v6.10.1' > [1,2,3].includes(2) true > '123'.includes(2) true |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Given that there are no more objections, I'm going to go ahead and land this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 0142276. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: #12604 Refs: #12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: #12604 Refs: #12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: #12604 Refs: #12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: #12604 Refs: #12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: nodejs#12604 Refs: nodejs#12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. Backport-PR-URL: #19447 PR-URL: #12604 Refs: #12586 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
RemoveindexOf usage from tests in favor of includes
There was an error while loading. Please reload this page.