🔧 Spec: Don’t use deprecated new Buffer()
This commit is contained in:
parent
f7d6e3fa7b
commit
0278e380de
6 changed files with 16 additions and 16 deletions
|
@ -242,7 +242,7 @@ describe('session module', () => {
|
|||
})
|
||||
|
||||
it('can cancel default download behavior', (done) => {
|
||||
const mockFile = new Buffer(1024)
|
||||
const mockFile = Buffer.alloc(1024)
|
||||
const contentDisposition = 'inline; filename="mockFile.txt"'
|
||||
const downloadServer = http.createServer((req, res) => {
|
||||
res.writeHead(200, {
|
||||
|
@ -271,7 +271,7 @@ describe('session module', () => {
|
|||
})
|
||||
|
||||
describe('DownloadItem', () => {
|
||||
const mockPDF = new Buffer(1024 * 1024 * 5)
|
||||
const mockPDF = Buffer.alloc(1024 * 1024 * 5)
|
||||
let contentDisposition = 'inline; filename="mock.pdf"'
|
||||
const downloadFilePath = path.join(fixtures, 'mock.pdf')
|
||||
const downloadServer = http.createServer((req, res) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue