   filter hasValue, xs
 hasValue = (x) ->
   toValue(x) != "<error>"
+
+# Wrap EventEmitter as EventTarget
+toEventTarget = (emitter) ->
+  addEventListener: (event, handler) -> emitter.addListener(event, handler)
+  removeEventListener: (event, handler) -> emitter.removeListener(event, handler)

      -> Bacon.fromEventTarget(emitter, "data").take(1)
      ["x"]
    )

describe "EventStream.filter", -> 
  it "should filter values", ->

describe "Bacon.fromEventTarget", ->
  it "should create EventStream from DOM object", ->
    emitter = new EventEmitter()
    emitter.on "newListener", ->
      runs ->
        emitter.emit "click", "x"

    element = toEventTarget emitter

    expectStreamEvents(
      -> Bacon.fromEventTarget(element, "click").take(1)
