eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
753 stars 133 forks source link

[DEP0005] DeprecationWarning: Buffer() is deprecated #204

Closed vad3x closed 4 years ago

vad3x commented 4 years ago

Overview:

Nodejs writes a warning to console when using the library:

[DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Versions: node-mocks-http: 1.8.1 node: v12.14.0

Suggestions:

Use Buffer.alloc instead of new Buffer

eugef commented 4 years ago

@vad3x thanks for reporting

github-actions[bot] commented 4 years ago

Stale issue message