Skip to content

Commit 4fddd22

Browse files
amitguptagwlsindresorhus
authored andcommitted
Replace deprecated methods in tests (#7)
1 parent f90e1d9 commit 4fddd22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('string', async t => {
2020
});
2121

2222
test('buffer', async t => {
23-
const f = new Buffer(fixture);
23+
const f = Buffer.from(fixture);
2424
t.true((await getStream.buffer(m(f))).equals(f));
2525
});
2626

@@ -104,7 +104,7 @@ test.cb('pushes chunk on next tick', t => {
104104
flag = true;
105105
});
106106

107-
m(new Buffer(fixture)).on('data', () => {
107+
m(Buffer.from(fixture)).on('data', () => {
108108
t.true(flag);
109109
t.end();
110110
});

0 commit comments

Comments
 (0)