Permalink
Browse files

testling badge and a test

  • Loading branch information...
substack committed Dec 23, 2012
1 parent 79aff61 commit 0147a7fb623fd3597a49a091b7152c57495ff234
Showing with 22 additions and 0 deletions.
  1. +2 −0 readme.markdown
  2. +20 −0 test/emit.js
View
@@ -5,6 +5,8 @@ with a node-style
[EventEmitter](http://nodejs.org/docs/latest/api/events.html#events_class_events_eventemitter)
api
+[![browser support](http://ci.testling.com/substack/ever.png)](http://ci.testling.com/substack/ever)
+
# example
[view the demo](http://substack.net/projects/ever-example/)
View
@@ -0,0 +1,20 @@
+var test = require('tape');
+var ever = require('../');
+
+test(function (t) {
+ t.plan(2);
+
+ var box = document.createElement('div');
+
+ ever(box).on('click', function (ev) {
+ t.pass('caught click with ever().on');
+ });
+
+ box.addEventListener('click', function (ev) {
+ t.pass('caught click with addEventListener');
+ });
+
+ setInterval(function () {
+ ever(box).emit('click');
+ }, 100);
+});

0 comments on commit 0147a7f

Please sign in to comment.