Eugene Lazutkin 3 rokov pred
rodič
commit
9a02c1c4f9
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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({
 export const readString = (string, quant) => new Readable({
   read() {
   read() {
-    if (isNaN(quant)) {
+    if (isNaN(quant) || quant < 1) {
       this.push(string);
       this.push(string);
     } else if (string instanceof Buffer) {
     } else if (string instanceof Buffer) {
       for (let i = 0; i < string.length; i += quant) {
       for (let i = 0; i < string.length; i += quant) {