Permalink
Browse files

Added a test for sub-strings. Confirming #63 close.

  • Loading branch information...
1 parent 96ae9da commit 91712bdfd520a791737aacad785c89d103000042 @Olical committed Oct 26, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/tests.js
View
@@ -58,6 +58,17 @@
assert.strictEqual(listeners.bar[0].listener(), 'bar');
assert.strictEqual(listeners.baz[0].listener(), 'baz');
});
+
+ test('does not return matched sub-strings', function () {
+ var check = function () {};
+
+ ee.addListener('foo', function () {});
+ ee.addListener('fooBar', check);
+
+ var listeners = ee.getListeners('fooBar');
+ assert.strictEqual(listeners.length, 1);
+ assert.strictEqual(listeners[0].listener, check);
+ });
});
suite('flattenListeners', function () {

0 comments on commit 91712bd

Please sign in to comment.