test: add fs-assert-encoding's test#10913
Conversation
There was a problem hiding this comment.
Can you create a noop variable, give it the value of () => {}, then just reuse that.
a652769 to
96b89c1
Compare
cjihrig
left a comment
There was a problem hiding this comment.
One more small nit, but LGTM
There was a problem hiding this comment.
Since options never changes, you can just use test in the regex, and use a literal instead of the RegExp() constructor.
Check the error of `assertEncoding`. Confirmed in every place being used.(a place where `getoptions` is used) assetEncoding: https://github.com/nodejs/node/blob/521767c88605cb6481ea98f396924e55f9dd22f4/lib/internal/fs.js#L18
96b89c1 to
1f6fd2f
Compare
|
|
|
Ops I messed up. |
|
@lpinca you can still |
|
@gibfahn yes thanks, but I only closed the wrong PR by mistake :) |
|
@lpinca Can I merge to master? |
|
@abouthiroppy sure. |
|
|
|
Yes, there are some failures on |
Check the error of `assertEncoding`. Confirmed in every place being used.(a place where `getoptions` is used) assetEncoding: https://github.com/nodejs/node/blob/521767c88605cb6481ea98f396924e55f9dd22f4/lib/internal/fs.js#L18 PR-URL: #10913 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
Landed in 9db8973. |
Check the error of `assertEncoding`. Confirmed in every place being used.(a place where `getoptions` is used) assetEncoding: https://github.com/nodejs/node/blob/521767c88605cb6481ea98f396924e55f9dd22f4/lib/internal/fs.js#L18 PR-URL: nodejs#10913 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Check the error of `assertEncoding`. Confirmed in every place being used.(a place where `getoptions` is used) assetEncoding: https://github.com/nodejs/node/blob/521767c88605cb6481ea98f396924e55f9dd22f4/lib/internal/fs.js#L18 PR-URL: nodejs#10913 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
This is not landing cleanly on v6 or v4. Backport? |
|
Test fails on both v4 and v6 btw |
Check the error of
assertEncoding.Confirmed in every place being used.(a place where getOptions is used)
assetEncoding:
node/lib/internal/fs.js
Line 18 in 521767c
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test