Skip to content

Commit

Permalink
Use Buffer.from instead of new Buffer in test suite, avoiding depreca…
Browse files Browse the repository at this point in the history
…tion warning
  • Loading branch information
papandreou committed Oct 14, 2018
1 parent 8ce2754 commit 5d7516d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/OptiPng.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('OptiPng', () => {
}
});

optiPng.end(new Buffer('qwvopeqwovkqvwiejvq', 'utf-8'));
optiPng.end(Buffer.from('qwvopeqwovkqvwiejvq', 'utf-8'));
});

it('should emit a single error if an invalid command line is specified', done => {
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('OptiPng', () => {
}
});

optiPng.end(new Buffer('qwvopeqwovkqvwiejvq', 'utf-8'));
optiPng.end(Buffer.from('qwvopeqwovkqvwiejvq', 'utf-8'));
});

describe('#destroy', () => {
Expand Down

0 comments on commit 5d7516d

Please sign in to comment.