From cbf540136f07f1fb9c8101924b11db52fb6f0204 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 23 Jun 2019 08:39:57 -0500 Subject: [PATCH] worker: assign missing deprecation code PR-URL: https://github.com/nodejs/node/pull/28395 Reviewed-By: Rich Trott Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Tiancheng "Timothy" Gu --- lib/internal/worker.js | 2 +- test/parallel/test-worker-nexttick-terminate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 8fbff4fcf2cacf..b6a7bbad671ecb 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -232,7 +232,7 @@ class Worker extends EventEmitter { process.emitWarning( 'Passing a callback to worker.terminate() is deprecated. ' + 'It returns a Promise instead.', - 'DeprecationWarning', 'DEP0XXX'); + 'DeprecationWarning', 'DEP0132'); this.once('exit', (exitCode) => callback(null, exitCode)); } diff --git a/test/parallel/test-worker-nexttick-terminate.js b/test/parallel/test-worker-nexttick-terminate.js index 9a22605bb54491..0e5d7e096c57ec 100644 --- a/test/parallel/test-worker-nexttick-terminate.js +++ b/test/parallel/test-worker-nexttick-terminate.js @@ -16,7 +16,7 @@ process.nextTick(() => { common.expectWarning( 'DeprecationWarning', 'Passing a callback to worker.terminate() is deprecated. ' + - 'It returns a Promise instead.', 'DEP0XXX'); + 'It returns a Promise instead.', 'DEP0132'); w.on('message', common.mustCall(() => { setTimeout(() => {