Eugene Lazutkin пре 3 година
родитељ
комит
9a02c1c4f9
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      tests/helpers.mjs

+ 1 - 1
tests/helpers.mjs

@@ -13,7 +13,7 @@ export const streamToArray = array =>
 
 export const readString = (string, quant) => new Readable({
   read() {
-    if (isNaN(quant)) {
+    if (isNaN(quant) || quant < 1) {
       this.push(string);
     } else if (string instanceof Buffer) {
       for (let i = 0; i < string.length; i += quant) {