Skip to content

Commit 4467d10

Browse files
committed
chore: fix test on node 25
1 parent 1fbdeff commit 4467d10

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/deploy-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
timeout-minutes: 10
1414
strategy:
1515
matrix:
16-
node-version: [24, 22, 20, 18, 16]
16+
node-version: [25, 24, 22, 20, 18, 16]
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 10
1616
strategy:
1717
matrix:
18-
node-version: [24, 22, 20, 18, 16, 14, 12, 10, 8]
18+
node-version: [25, 24, 22, 20, 18, 16, 14, 12, 10, 8]
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v4

test/vm.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,10 +2319,14 @@ describe('VM', () => {
23192319
hexSlice:()=>''
23202320
};
23212321
let f;
2322-
obj.slice(20, {showHidden: true, showProxy: true, depth: 10, stylize(a) {
2323-
if (this.seen && this.seen[1] && this.seen[1].get){f=this.seen[1];}
2324-
return a;
2325-
}});
2322+
try {
2323+
obj.slice(20, {showHidden: true, showProxy: true, depth: 10, stylize(a) {
2324+
if (this.seen && this.seen[1] && this.seen[1].get){f=this.seen[1];}
2325+
return a;
2326+
}});
2327+
} catch (e) {
2328+
// Expected: Buffer.prototype.slice may throw when this is not a Buffer
2329+
}
23262330
let escaped = false;
23272331
try {
23282332
const b = ho.entries({});

0 commit comments

Comments
 (0)