   it "takes elements from source until an event appears in the other stream", ->
     expectPropertyEvents(
       ->
-        src = repeat(20, [1, error(), 3])
-        stopper = repeat(50, ["stop!"])
+        src = repeat(2, [1, error(), 3])
+        stopper = repeat(5, ["stop!"])
         src.toProperty(0).takeUntil(stopper)
       [0, 1, error()])
 
 describe "Property.endOnError", ->
   it "terminates on Error", ->
     expectPropertyEvents(
-      -> repeat(20, [1, error(), 2]).take(2).toProperty().endOnError()
+      -> repeat(2, [1, error(), 2]).take(2).toProperty().endOnError()
       [1, error()])
 
 describe "Property.distinctUntilChanged", ->
   it "drops duplicates", ->
     expectPropertyEvents(
-      -> repeat(10, [1, 2, error(), 2, 3, 1]).take(5).toProperty(0).distinctUntilChanged()
+      -> repeat(1, [1, 2, error(), 2, 3, 1]).take(5).toProperty(0).distinctUntilChanged()
     [0, 1, 2, error(), 3, 1])
 
 describe "Property.changes", ->

describe "EventStream.filter", -> 
  it "should filter values", ->
    expectStreamEvents(
      -> repeat(10, [1, 2, error(), 3]).take(3).filter(lessThan(3))
      [1, 2, error()])

describe "EventStream.map", ->
  it "should map with given function", ->
    expectStreamEvents(
      -> repeat(10, [1, 2, 3]).take(3).map(times(2))
      [2, 4, 6])
  it "also accepts a constant value", ->
    expectStreamEvents(
      -> repeat(10, [1, 2, 3,]).take(3).map("lol")
      ["lol", "lol", "lol"])
  it "..and a property value, starting with .", ->
    o = { lol : "wut" }
    expectStreamEvents(
      -> repeat(10, [o]).take(3).map(".lol")
      ["wut", "wut", "wut"])
  it "..and a property value, starting with ., where property is a function", ->
    o = { lol : -> "wut" }
    expectStreamEvents(
      -> repeat(10, [o]).take(3).map(".lol")
      ["wut", "wut", "wut"])

describe "EventStream.mapError", ->
  it "should map error events with given function", ->
    expectStreamEvents(
        -> repeat(10, [1, error("OOPS")]).mapError(id).take(2)
        [1, "OOPS"])
  it "also accepts a constant value", ->
    expectStreamEvents(
        -> repeat(10, [1, error()]).mapError("ERR").take(2)
        [1, "ERR"])

describe "EventStream.do", ->
  it "does not alter the stream", ->
    expectStreamEvents(
      -> repeat(10, [1, 2]).take(2).do(->)
      [1, 2])
  it "calls function before sending value to listeners", ->
    called = []

describe "EventStream.scan", ->
  it "accumulates values with given seed and accumulator function, passing through errors", ->
    expectPropertyEvents(
      -> repeat(1, [1, 2, error(), 3]).take(3).scan(0, add)
      [0, 1, 3, error(), 6])
  it "also works with method name", ->
    expectPropertyEvents(
      -> repeat(1, [[1], [2]]).take(2).scan([], ".concat")
      [[], [1], [1, 2]])
  it "yields the seed value immediately", ->
    outputs = []
