Skip to content

Commit a914fbf

Browse files
committed
[squash]change into buf.toString()
1 parent 973e27e commit a914fbf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-buffer-slice.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ const expectedSameBufs = [
6262
[buf.slice('0', '-111'), Buffer.from('', 'utf8')]
6363
];
6464

65-
for (let i = 0, s = buf; i < buf.length; ++i) {
65+
for (let i = 0, s = buf.toString(); i < buf.length; ++i) {
6666
expectedSameBufs.push(
67-
[buf.slice(i), s.slice(i)],
68-
[buf.slice(0, i), s.slice(0, i)],
69-
[buf.slice(-i), s.slice(-i)],
70-
[buf.slice(0, -i), s.slice(0, -i)]
67+
[buf.slice(i), Buffer.from(s.slice(i))],
68+
[buf.slice(0, i), Buffer.from(s.slice(0, i))],
69+
[buf.slice(-i), Buffer.from(s.slice(-i))],
70+
[buf.slice(0, -i), Buffer.from(s.slice(0, -i))]
7171
);
7272
}
7373

0 commit comments

Comments
 (0)