Skip to content

Conversation

@toboid
Copy link
Contributor

Verify specific errors thrown by buffer.includes and change tests to use arrow functions as per latest testing guide.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

tests, buffer

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Feb 6, 2017
@toboidtoboid changed the title Improve buffer.includes testsImprove buffer.includes error verification testsFeb 6, 2017
assert.throws(function(){
assert.throws(()=>{
b.includes(()=>{});
},/^TypeError:"val"argumentmustbestring,number,BufferorUint8Array$/);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this regular expression in a variable so that it can be reused.

@hiroppyhiroppy added the buffer Issues and PRs related to the buffer subsystem. label Feb 7, 2017
@fhalde
Copy link
Contributor

Please prefix the PR with test,buffer tag. Commit message guidelines

@toboidtoboidforce-pushed the improve-buffer-includes-tests branch from a694127 to 83c8f29CompareFebruary 7, 2017 21:13
@toboidtoboid changed the title Improve buffer.includes error verification teststest,buffer: improve buffer.includes error verification testsFeb 7, 2017
@Trott
Copy link
Member

Trott commented Feb 7, 2017

Please prefix the PR with test,buffer tag. Commit message guidelines

Gotta mildly disagree with that. Just test: is fine. This is a change to the way a test works, not anything specific to buffer. The fact that it's a buffer test is incidental. No one looking for buffer changes is going to want to see this. And adding buffer just makes it harder to keep the first line to 50 chars.

(EDIT: But if someone did put test,buffer: I wouldn't complain either. I just wouldn't insist that someone do that. And I would be especially careful with nits like that on first time contributors because they tend to internalize them as hard-and-fast rules.)

@toboidtoboid changed the title test,buffer: improve buffer.includes error verification teststest: improve buffer.includes error verification testsFeb 7, 2017
@toboid
Copy link
ContributorAuthor

test tag make sense to me for the reasons you outlined

Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI is green.

@Trott
Copy link
Member

Trott commented Feb 7, 2017

@toboid
Copy link
ContributorAuthor

Looks like there was an issue with the build server, it started returning http 502, now that its back the above build has disappeared, it's returning http 404. Does CI need to be kicked-off again?

@Trott
Copy link
Member

Trott commented Feb 8, 2017

@fhalde
Copy link
Contributor

@Trott haha. It was supposed to be test or buffer. I wasn't sure what was appropriate for this case. Anyway test it is 😄

@jasnell
Copy link
Member

CI failures on freebsd are unrelated

@Trott
Copy link
Member

Trott commented Feb 8, 2017

jasnell pushed a commit that referenced this pull request Feb 11, 2017
* verify error message * use arrow funcs PR-URL: #11203 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

Landed in 1544d8f

@italoacasas
Copy link

This commit is breaking tests in v7.x, maybe because of some semver-major... any plan to backport this?

krydos pushed a commit to krydos/node that referenced this pull request Feb 25, 2017
* verify error message * use arrow funcs PR-URL: nodejs#11203 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@jasnelljasnell mentioned this pull request Apr 4, 2017
@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
@gibfahn
Copy link
Member

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

@targos
Copy link
Member

I am backporting this with #12270

gibfahn pushed a commit that referenced this pull request Jun 19, 2017
* verify error message * use arrow funcs PR-URL: #11203 Backport-PR-URL: #13785 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
* verify error message * use arrow funcs PR-URL: #11203 Backport-PR-URL: #13785 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
* verify error message * use arrow funcs PR-URL: #11203 Backport-PR-URL: #13785 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jul 18, 2017
abhishekumar-tyagi pushed a commit to abhishekumar-tyagi/node that referenced this pull request May 5, 2024
* verify error message * use arrow funcs PR-URL: nodejs/node#11203 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bufferIssues and PRs related to the buffer subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@toboid@fhalde@Trott@jasnell@italoacasas@gibfahn@targos@cjihrig@hiroppy@nodejs-github-bot