| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1c9ba2c commit e52237d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,18 +6,20 @@ common.skipIf32Bits(); | |||
| 6 | 6 | ||
| 7 | 7 | const assert = require('assert'); | |
| 8 | 8 | const { internalBinding } = require('internal/test/binding'); | |
| 9 | - const async_wrap = internalBinding('async_wrap'); | ||
| 10 | - const { kTotals } = async_wrap.constants; | ||
| 9 | + const { async_hook_fields, constants } = internalBinding('async_wrap'); | ||
| 10 | + const { kTotals } = constants; | ||
| 11 | 11 | const inspector = require('inspector'); | |
| 12 | 12 | ||
| 13 | 13 | const setDepth = 'Debugger.setAsyncCallStackDepth'; | |
| 14 | 14 | ||
| 15 | 15 | function verifyAsyncHookDisabled(message) { | |
| 16 | - assert.strictEqual(async_wrap.async_hook_fields[kTotals], 0); | ||
| 16 | + assert.strictEqual(async_hook_fields[kTotals], 0, | ||
| 17 | + `${async_hook_fields[kTotals]} !== 0: ${message}`); | ||
| 17 | 18 | } | |
| 18 | 19 | ||
| 19 | 20 | function verifyAsyncHookEnabled(message) { | |
| 20 | - assert.strictEqual(async_wrap.async_hook_fields[kTotals], 4); | ||
| 21 | + assert.strictEqual(async_hook_fields[kTotals], 4, | ||
| 22 | + `${async_hook_fields[kTotals]} !== 4: ${message}`); | ||
| 21 | 23 | } | |
| 22 | 24 | ||
| 23 | 25 | // By default inspector async hooks should not have been installed. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments