diff --git a/lib/domain.js b/lib/domain.js index 4e6cfcebc3aa51..acd5dc8221df31 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -456,7 +456,7 @@ EventEmitter.init = function() { }; const eventEmit = EventEmitter.prototype.emit; -EventEmitter.prototype.emit = function(...args) { +EventEmitter.prototype.emit = function emit(...args) { const domain = this.domain; const type = args[0]; diff --git a/test/parallel/test-domain-dep0097.js b/test/parallel/test-domain-dep0097.js index e877a4c47cc959..05b5c74b30d98e 100644 --- a/test/parallel/test-domain-dep0097.js +++ b/test/parallel/test-domain-dep0097.js @@ -9,7 +9,7 @@ const inspector = require('inspector'); process.on('warning', common.mustCall((warning) => { assert.strictEqual(warning.code, 'DEP0097'); - assert.match(warning.message, /Triggered by calling on process/); + assert.match(warning.message, /Triggered by calling emit on process/); })); domain.create().run(() => {