Get tests passing again

This commit is contained in:
Michael Jackson
2019-07-09 17:21:25 -07:00
parent 2e3c9ff526
commit f3ecddea47
42 changed files with 309 additions and 305 deletions

View File

@ -1,10 +1,10 @@
export default function bufferStream(stream) {
return new Promise((resolve, reject) => {
return new Promise((accept, reject) => {
const chunks = [];
stream
.on('error', reject)
.on('data', chunk => chunks.push(chunk))
.on('end', () => resolve(Buffer.concat(chunks)));
.on('end', () => accept(Buffer.concat(chunks)));
});
}