Browse Source

test: confirm callback is invoked in fs test

Use common.mustCall() in test-fs-makeStatsCallback to confirm that the
callback is invoked.

PR-URL: https://github.com/nodejs/node/pull/13132
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6
Rich Trott 8 years ago
committed by Anna Henningsen
parent
commit
7c12d12ecf
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 2
      test/parallel/test-fs-makeStatsCallback.js

2
test/parallel/test-fs-makeStatsCallback.js

@ -16,7 +16,7 @@ function testMakeStatsCallback(cb) {
common.expectWarning('DeprecationWarning', warn);
// Verify the case where a callback function is provided
assert.doesNotThrow(testMakeStatsCallback(common.noop));
assert.doesNotThrow(testMakeStatsCallback(common.mustCall()));
// Passing undefined/nothing calls rethrow() internally, which emits a warning
assert.doesNotThrow(testMakeStatsCallback());

Loading…
Cancel
Save