test: remove redundant common.mustCall
All calls verify the cb is called, thus using `common.mustCall` is not required inside of this function. PR-URL: https://github.com/nodejs/node/pull/26738 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
3fe1e80896
commit
e96e3f9eb0
@ -38,12 +38,12 @@ function test(env, cb) {
|
|||||||
const filename = fixtures.path('test-fs-readfile-error.js');
|
const filename = fixtures.path('test-fs-readfile-error.js');
|
||||||
const execPath = `"${process.execPath}" "${filename}"`;
|
const execPath = `"${process.execPath}" "${filename}"`;
|
||||||
const options = { env: Object.assign({}, process.env, env) };
|
const options = { env: Object.assign({}, process.env, env) };
|
||||||
exec(execPath, options, common.mustCall((err, stdout, stderr) => {
|
exec(execPath, options, (err, stdout, stderr) => {
|
||||||
assert(err);
|
assert(err);
|
||||||
assert.strictEqual(stdout, '');
|
assert.strictEqual(stdout, '');
|
||||||
assert.notStrictEqual(stderr, '');
|
assert.notStrictEqual(stderr, '');
|
||||||
cb(String(stderr));
|
cb(String(stderr));
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
test({ NODE_DEBUG: '' }, common.mustCall((data) => {
|
test({ NODE_DEBUG: '' }, common.mustCall((data) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user