From 4f2e372716714ed030cb5ba6e67107b913f15343 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 24 Mar 2017 09:46:44 -0700 Subject: test: add common.noop, default for common.mustCall() Export a new common.noop no-operation function for general use. Allow using common.mustCall() without a fn argument to simplify test cases. Replace various non-op functions throughout tests with common.noop PR-URL: https://github.com/nodejs/node/pull/12027 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Richard Lau Reviewed-By: Gibson Fahnestock Reviewed-By: Teddy Katz Reviewed-By: Colin Ihrig Reviewed-By: Franziska Hinkelmann --- test/parallel/test-promises-warning-on-unhandled-rejection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/parallel/test-promises-warning-on-unhandled-rejection.js') diff --git a/test/parallel/test-promises-warning-on-unhandled-rejection.js b/test/parallel/test-promises-warning-on-unhandled-rejection.js index 10f95162a0..f3c7a8771e 100644 --- a/test/parallel/test-promises-warning-on-unhandled-rejection.js +++ b/test/parallel/test-promises-warning-on-unhandled-rejection.js @@ -26,4 +26,4 @@ process.on('warning', common.mustCall((warning) => { }, 3)); const p = Promise.reject('This was rejected'); -setImmediate(common.mustCall(() => p.catch(() => {}))); +setImmediate(common.mustCall(() => p.catch(common.noop))); -- cgit v1.2.1