<commit_before>describe("museq", function() {
  function fromNow(offset) {
    return +(new Date()) + offset
  }


  function capture(s, fn) {
    var results = []
    fn = sig.prime(sig.slice(arguments, 2), fn || sig.identity)

    s.then(function(v) {
      results.push(v)
      this.next()
    })

    return fn(results)
  }


  function snapshots() {
    var tasks = []

    self.at = function(interval, fn) {
      tasks.push([interval, fn])
      return self
    }

    function self(s) {
      var values = []
      var t = sig()

      var u = t
        .append(sig.spread, function(interval, fn) {
          return museq.sleep(interval)
            .map(function() { return fn(values) })
        })
        .limit(tasks.length)

      s.each(function(x) { values.push(x) })
       .redir(u)

      t.putEach(tasks)
      return u
    }

    return self<commit_msg>fix tests that broke as of sig 0.3.4<commit_after>describe("museq", function() {
  function fromNow(offset) {
    return +(new Date()) + offset
  }


  function capture(s, fn) {
    var results = []
    fn = sig.prime(sig.slice(arguments, 2), fn || sig.identity)

    s.then(function(v) {
      results.push(v)
      this.next()
    })

    return fn(results)
  }


  function snapshots() {
    var tasks = []

    self.at = function(interval, fn) {
      tasks.push([interval, fn])
      return self
    }

    function self(s) {
      var values = []

      var t = sig(tasks)
        .append(sig.spread, function(interval, fn) {
          return museq.sleep(interval)
            .map(function() { return fn(values) })
        })
        .limit(tasks.length)
        .each(function() { this.next() })

      s.each(function(x) { values.push(x) })
       .redir(t)

      return t
    }

    return self
{'fraction_non_alphanumeric': 0.14727374929735806, 'fraction_numerical': 0.002810567734682406, 'mean_word_length': 2.0272108843537415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5902602', 'n_tokens_mistral': 611, 'n_tokens_neox': 577, 'n_words': 126}