diff options
Diffstat (limited to 'test/specHelper.js')
-rw-r--r-- | test/specHelper.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/specHelper.js b/test/specHelper.js index f00202a..2bd6fa2 100644 --- a/test/specHelper.js +++ b/test/specHelper.js @@ -5,7 +5,7 @@ function $ (str, context) { return (context || fixture.el).querySelector(str); } -function $$(str, context) { +function $$ (str, context) { return (context || fixture.el).querySelectorAll(str); } @@ -20,7 +20,11 @@ $.fixture = function (fixtureName) { afterEach(function () { fixture.cleanup(); }); -} +}; + +$.on = function (element, event, callback) { + element.addEventListener(event, callback); +}; // $.noop returns a new empty function each time it's being called Object.defineProperty($, "noop", { |