From 1d6057d6745470ceb7ca9bcc9a83eaec00da8942 Mon Sep 17 00:00:00 2001 From: steven nguyen Date: Mon, 25 Oct 2021 14:41:09 -0500 Subject: [PATCH] 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)` --- test/git-strategies.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/git-strategies.test.js b/test/git-strategies.test.js index c39b8dca60..3d7ad41b85 100644 --- a/test/git-strategies.test.js +++ b/test/git-strategies.test.js @@ -837,7 +837,7 @@ import * as reporterProxy from '../lib/reporter-proxy'; it('returns an empty diff', async function() { const workingDirPath = await cloneRepository('three-files'); const git = createTestStrategy(workingDirPath); - const data = new Buffer(10); + const data = Buffer.alloc(10); for (let i = 0; i < 10; i++) { data.writeUInt8(i + 200, i); }