Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 1d6057d

Browse files
authored
Don't use deprecated Buffer
According to https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/, `Buffer(number)` should be replaced by `Buffer.alloc(number)`
1 parent 2053290 commit 1d6057d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/git-strategies.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ import * as reporterProxy from '../lib/reporter-proxy';
837837
it('returns an empty diff', async function() {
838838
const workingDirPath = await cloneRepository('three-files');
839839
const git = createTestStrategy(workingDirPath);
840-
const data = new Buffer(10);
840+
const data = Buffer.alloc(10);
841841
for (let i = 0; i < 10; i++) {
842842
data.writeUInt8(i + 200, i);
843843
}

0 commit comments

Comments
 (0)