-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Make test match others in repository #15935
Conversation
@@ -10,5 +10,4 @@ const buffer = new ArrayBuffer(128); | |||
const template = Reflect.construct(DataView, [buffer]); | |||
|
|||
const theDataview = test_dataview.CreateDataView(template); | |||
assert.ok(theDataview instanceof DataView, | |||
'The new variable should be of type Dataview'); | |||
assert.ok(theDataview instanceof DataView); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best to include the actual instanceof value in the error message here instead of just removing the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of theDataView instanceof DataView
will reliably be true
or false
and thus false
if this fails. What might be useful is displaying the value of theDataView
so it can be obvious why that failed. If theDataView
is undefined
rather than some kind of complex object, that's useful info.
@@ -10,5 +10,4 @@ const buffer = new ArrayBuffer(128); | |||
const template = Reflect.construct(DataView, [buffer]); | |||
|
|||
const theDataview = test_dataview.CreateDataView(template); | |||
assert.ok(theDataview instanceof DataView, | |||
'The new variable should be of type Dataview'); | |||
assert.ok(theDataview instanceof DataView); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @mattcan |
My apologies, I'll wrap this up over the weekend. |
@@ -10,5 +10,4 @@ const buffer = new ArrayBuffer(128); | |||
const template = Reflect.construct(DataView, [buffer]); | |||
|
|||
const theDataview = test_dataview.CreateDataView(template); | |||
assert.ok(theDataview instanceof DataView, | |||
'The new variable should be of type Dataview'); | |||
assert.ok(`Expect ${theDataview} to be a DataView`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer correct as it is always truthy. Can you please add back the first argument? theDataview instanceof DataView
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, sorry. Shouldn't do things while asleep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. Now I think the line is too long and our linter isn't happy with it. Can you please move the second argument to the next as it was originally?
Thanks!
ESLint is reporting that the changed line exceeds 80 characters. Can you split it into two lines like it was before (but leave your change, of course)? Run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint error needs fixing.
PTAL, all approvals reviewed the first commit. |
PR-URL: #15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Landed in 201ecef, thank you for your contribution! 🎉 |
PR-URL: #15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: #15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: #15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs/node#15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs/node#15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs/node#15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs#15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Backport-PR-URL: #19447 PR-URL: #15935 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Working on our first commit in Node. The task was to review
assert.ok
and determine if the string literal made sense or not. After reviewing other tests in nearby directories, we determined that removing the message would better match the repository.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
dataview