Skip to content

Commit 81a2bc0

Browse files
authored
test(debugger): handle Node 24.11.1+ ArrayBuffer inspector change (#6898)
1 parent e5c0194 commit 81a2bc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

integration-tests/debugger/template.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
'use strict'
22

33
const { assert } = require('chai')
4+
const semver = require('semver')
45
const { setup } = require('./utils')
56
const { NODE_MAJOR } = require('../../version')
67

8+
const NODE_24_11_1_OR_LATER = semver.gte(process.version, '24.11.1')
9+
710
describe('Dynamic Instrumentation', function () {
811
describe('template evaluation', function () {
912
const t = setup({ dependencies: ['fastify'] })
@@ -97,7 +100,8 @@ describe('Dynamic Instrumentation', function () {
97100
messages.shift(),
98101
'ArrayBuffer { ' +
99102
'[Uint8Contents]: <00 00 00 ... 7 more bytes>, ' +
100-
"byteLength: 10, '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9 " +
103+
(NODE_24_11_1_OR_LATER ? '[byteLength]' : 'byteLength') +
104+
": 10, '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9 " +
101105
'}'
102106
)
103107
assert.strictEqual(messages.shift(), 'Uint8Array(10) [ 0, 0, 0, ... 7 more items ]')

0 commit comments

Comments
 (0)