add heal test
This commit is contained in:
parent
f891caa99d
commit
c86c90d915
6 changed files with 46 additions and 10 deletions
|
|
@ -71,11 +71,12 @@ let client = moto.client = {
|
|||
let ondata, ondone, onerror = reject;
|
||||
if (!stream) {
|
||||
let accum = [];
|
||||
let simple = options.simple !== false;
|
||||
ondata = (data) => {
|
||||
accum.push(data);
|
||||
};
|
||||
ondone = () => {
|
||||
resolve(accum);
|
||||
resolve(simple && accum.length === 1 ? accum[0] : accum);
|
||||
};
|
||||
} else {
|
||||
ondata = stream;
|
||||
|
|
|
|||
Loading…
Reference in a new issue