| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 25a5f0b commit 1c09776
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -130,7 +130,7 @@ function emitMakeCallbackDeprecation({ target, method }) { | |||
| 130 | 130 | 'Using a domain property in MakeCallback is deprecated. Use the ' + | |
| 131 | 131 | 'async_context variant of MakeCallback or the AsyncResource class ' + | |
| 132 | 132 | 'instead. ' + | |
| 133 | - `(Triggered by calling ${method?.name ?? '<anonymous>'} ` + | ||
| 133 | + `(Triggered by calling ${method?.name || '<anonymous>'} ` + | ||
| 134 | 134 | `on ${target?.constructor?.name}.)`, | |
| 135 | 135 | 'DeprecationWarning', 'DEP0097'); | |
| 136 | 136 | sendMakeCallbackDeprecation = true; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + | ||
| 4 | + common.skipIfInspectorDisabled(); | ||
| 5 | + | ||
| 6 | + const assert = require('assert'); | ||
| 7 | + const domain = require('domain'); | ||
| 8 | + const inspector = require('inspector'); | ||
| 9 | + | ||
| 10 | + process.on('warning', common.mustCall((warning) => { | ||
| 11 | + assert.strictEqual(warning.code, 'DEP0097'); | ||
| 12 | + assert.match(warning.message, /Triggered by calling <anonymous> on process/); | ||
| 13 | + })); | ||
| 14 | + | ||
| 15 | + domain.create().run(() => { | ||
| 16 | + inspector.open(); | ||
| 17 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments