add heal test

This commit is contained in:
Stewart Allen 2022-01-03 22:57:19 -05:00
commit c86c90d915
6 changed files with 46 additions and 10 deletions

View file

@ -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;