Skip to content

Commit 0987f3f

Browse files
authored
fix: Buffer deprecation warning (#1551)
1 parent 651e857 commit 0987f3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/http.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,13 @@ describe('http', () => {
494494
})
495495

496496
test('should return true for browser Buffer type', () => {
497-
expect(isFile(new Buffer([]))).toEqual(true)
497+
expect(isFile(Buffer.from([]))).toEqual(true)
498498
})
499499
test('should return true for browser Buffer type and browser user agent', () => {
500-
expect(isFile(new Buffer([]), mockBrowserNavigator)).toEqual(true)
500+
expect(isFile(Buffer.from([]), mockBrowserNavigator)).toEqual(true)
501501
})
502502
test('should return false for browser Buffer type and React Native user agent', () => {
503-
expect(isFile(new Buffer([]), mockReactNativeNavigator)).toEqual(false)
503+
expect(isFile(Buffer.from([]), mockReactNativeNavigator)).toEqual(false)
504504
})
505505

506506
test('should return false for React Native-like file object', () => {

0 commit comments

Comments
 (0)