Closed
Conversation
jasnell
approved these changes
Feb 8, 2017
joyeecheung
reviewed
Feb 8, 2017
test/parallel/test-fs-buffer.js
Outdated
Member
There was a problem hiding this comment.
I think the more common wording would be something like
const valHex = Buffer.from(val).toString('hex');
const message = `expected ${valHex} as hex value for ${val}, ` +
`got ${hexList[idx]} (hex value for ${fromHexList})`If I am reading this correctly?
Member
Author
There was a problem hiding this comment.
Your wording is better. Will update...
Member
Author
There was a problem hiding this comment.
How about this?:
`expected ${val}, got ${fromHexList} by hex decoding ${hexList[idx]}`The thing I'm trying to convey is this: val is the input. We put it in a file hex encoded. We read the file back in and got the hex-encoded value hexList[idx]. When we hex decode that value, we got fromHexList instead of val.
Member
There was a problem hiding this comment.
Yeah your proposal works too, and it is more succinct :)
* Remove unneeded temp dir cleanup * Add check for error in `.close()` callback * Improve error reporting On that last bullet point, the previous version of the test reported errors like this: ``` AssertionError: [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen deepStrictEqual [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen ``` Now, they look like this: ``` AssertionError: 2a is hex value for * and not catch-stdout-error.js ```
Member
Author
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Feb 10, 2017
* Remove unneeded temp dir cleanup * Add check for error in `.close()` callback * Improve error reporting On that last bullet point, the previous version of the test reported errors like this: ``` AssertionError: [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen deepStrictEqual [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen ``` Now, they look like this: ``` AssertionError: expected *, got ! by hex decoding 2a ``` PR-URL: nodejs#11232 Reviewed-By: James M Snell <jasnell@gmail.com>
Member
Author
|
Landed in 05be623 |
italoacasas
pushed a commit
that referenced
this pull request
Feb 13, 2017
* Remove unneeded temp dir cleanup * Add check for error in `.close()` callback * Improve error reporting On that last bullet point, the previous version of the test reported errors like this: ``` AssertionError: [ '.empty-repl-history-file', '.node_repl_history', 'GH-1899-output.js', 'GH-892-request.js', 'a.js', 'a1.js', 'agen deepStrictEqual [ '.empty-repl-history-file', '.node_repl_history', 'GH-1899-output.js', 'GH-892-request.js', 'a.js', 'a1.js', 'agen ``` Now, they look like this: ``` AssertionError: expected *, got ! by hex decoding 2a ``` PR-URL: #11232 Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas
pushed a commit
to italoacasas/node
that referenced
this pull request
Feb 14, 2017
* Remove unneeded temp dir cleanup * Add check for error in `.close()` callback * Improve error reporting On that last bullet point, the previous version of the test reported errors like this: ``` AssertionError: [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen deepStrictEqual [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen ``` Now, they look like this: ``` AssertionError: expected *, got ! by hex decoding 2a ``` PR-URL: nodejs#11232 Reviewed-By: James M Snell <jasnell@gmail.com>
krydos
pushed a commit
to krydos/node
that referenced
this pull request
Feb 25, 2017
* Remove unneeded temp dir cleanup * Add check for error in `.close()` callback * Improve error reporting On that last bullet point, the previous version of the test reported errors like this: ``` AssertionError: [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen deepStrictEqual [ '.empty-repl-history-file', '.node_repl_history', 'nodejsGH-1899-output.js', 'nodejsGH-892-request.js', 'a.js', 'a1.js', 'agen ``` Now, they look like this: ``` AssertionError: expected *, got ! by hex decoding 2a ``` PR-URL: nodejs#11232 Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
would need backport PRs to land in v4 or v6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.close()callbackOn that last bullet point, the previous version of the test reported
errors like this:
Now, they look like this:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test fs