How to use the baconjs.noMore function in baconjs

To help you get started, we’ve selected a few baconjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sighjs / sigh / test / src / plugin / write.spec.js View on Github external
writeStream.onValue(events => {
        // console.log('write events %j', events)
        if (++nValues === 1) {
          existsSync(TMP_FILE).should.be.ok
          existsSync(TMP_FILE + '.map').should.be.ok
        }
        else {
          existsSync(TMP_FILE).should.not.be.ok
          existsSync(TMP_FILE + '.map').should.not.be.ok
          resolve()
          return Bacon.noMore
        }
      })
      writeStream.onError(reject)
github rbelouin / fip.rbelouin.com / test / unit / controllers / play.spec.js View on Github external
expect(ev.value()).toStrictEqual([
        [],
        [
          {
            id: "TWO"
          }
        ],
        [
          {
            id: "ONE"
          }
        ]
      ]);

      done();
      return Bacon.noMore;
    });
github sighjs / sigh / test / src / plugin / merge.js View on Github external
streams.onValue(events => {
          ++nEvents
          events.length.should.equal(1)
          events[0].path.should.equal(`file${nEvents}.js`)
          if (nEvents === 3) {
            resolve()
            return Bacon.noMore
          }
        })
      })
github rbelouin / fip.rbelouin.com / test / unit / models / spotify.spec.js View on Github external
getPlaylists(send, token, userId).subscribe(function(ev) {
    expect(ev.hasValue()).toBeTruthy();
    expect(ev.value()).toStrictEqual(_.range(0, 130));
    done();

    return Bacon.noMore;
  });
});
github rbelouin / fip.rbelouin.com / test / unit / controllers / token.spec.js View on Github external
p_tokens1.subscribe(function(ev) {
    expect(ev.hasValue()).toBeTruthy();
    expect(ev.value()).toStrictEqual([null, null]);

    return Bacon.noMore;
  });
github rbelouin / fip.rbelouin.com / test / unit / models / fip.spec.js View on Github external
}
      },
      {
        type: "song",
        song: {
          id: "song2-2",
          startTime: 310
        }
      }
    ]);

    expect(radio4).toStrictEqual([]);

    done();

    return Bacon.noMore;
  });
});
github ayasin / frhttp / lib / routeExecutor.js View on Github external
runner();
				});
			}
			else {
				prodObj.done();
			}
		}
		catch (err) {
			console.log('ERROR: enter transform for function (' + name +
						') threw an exception (' + err + ') on input: \r\n' +
						safeJSONStringify(val, null, 2));
			prodObj.error(500, err);
			console.log('Stack Trace: ' + err.stack);
		}
		if (!takeMany) {
			return Bacon.noMore;
		}
	}, onDef.fn, onDef.name, onDef.enter, onDef.takeMany);
}
github skellyb / fluxstream / lib / store.js View on Github external
return Bacon.zipAsArray(streams).onValue(function(combo) {
            callback(combo);
            return Bacon.noMore;
        });
    }
github CleverCloud / clever-tools / spec / git.spec.js View on Github external
git.getBranch("master").subscribe(function(event) {
      expect(event.hasValue()).to.equal(true);
      expect(event.value().name()).to.equal("refs/heads/master");
      done();

      return Bacon.noMore;
    });
  });
github CleverCloud / clever-tools / spec / log.spec.js View on Github external
s_logs.subscribe(function(event) {
      context.expect(event.hasValue()).toBe(true);
      context.expect(event.value()).toBe("2015-01-06T18:10:37.606Z: Received signal 15; terminating.");
      done();

      return Bacon.noMore;
    });
  });