From 8257f8445ea8c03a4b5cced277c82ba1eb871f68 Mon Sep 17 00:00:00 2001 From: Timothy Lai Date: Fri, 29 May 2020 14:51:33 -0700 Subject: [PATCH] fix: Buffer deprecation warning --- test/http.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/http.js b/test/http.js index d3f9818d1..3fc28f827 100644 --- a/test/http.js +++ b/test/http.js @@ -494,13 +494,13 @@ describe('http', () => { }) test('should return true for browser Buffer type', () => { - expect(isFile(new Buffer([]))).toEqual(true) + expect(isFile(Buffer.from([]))).toEqual(true) }) test('should return true for browser Buffer type and browser user agent', () => { - expect(isFile(new Buffer([]), mockBrowserNavigator)).toEqual(true) + expect(isFile(Buffer.from([]), mockBrowserNavigator)).toEqual(true) }) test('should return false for browser Buffer type and React Native user agent', () => { - expect(isFile(new Buffer([]), mockReactNativeNavigator)).toEqual(false) + expect(isFile(Buffer.from([]), mockReactNativeNavigator)).toEqual(false) }) test('should return false for React Native-like file object', () => {