Sha256: a22c7a9b6e1902d04acafba6dc153f5665ffd465acc427a127382fc01eb5ae41

Contents?: true

Size: 779 Bytes

Versions: 5

Compression:

Stored size: 779 Bytes

Contents

"use strict";

var test = require("./util/test")
var concat = require("../concat")
var into = require("../into")
var delay = require("../delay")
var capture = require("../capture")
var lazy = require("./util/lazy")

exports["test delay empty"]  = test(function(assert) {
  var async = false
  var actual = concat(delay([]),
                      lazy(function() { return async }))

  assert(actual, [true], "delay makes things async")
  async = true
})

exports["test sequence of numbers"] = test(function(assert) {
  var async = false
  var actual = concat(delay([1, 2, 3, 4]),
                      lazy(function() { return async }))

  assert(actual, [1, 2, 3, 4, true], "dealy made stream async")
  async = true
})

if (module == require.main)
  require("test").run(exports)

Version data entries

5 entries across 2 versions & 1 rubygems

Version Path
ruby-wisp-source-0.8.0 vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js
ruby-wisp-source-0.8.0 vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js
ruby-wisp-source-0.7.0 vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js
ruby-wisp-source-0.7.0 vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js
ruby-wisp-source-0.7.0 vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js