From 89d33c5f3f6b5a66a31b65702ec9e8a48273672d Mon Sep 17 00:00:00 2001 From: Wojciech Zawistowski Date: Thu, 7 Nov 2013 19:46:38 +0100 Subject: [PATCH] adds QUnit test helper simplifying usage of #qunit-fixture --- test/javascripts/helpers/qunit_helpers.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/javascripts/helpers/qunit_helpers.js b/test/javascripts/helpers/qunit_helpers.js index c1eb80f82f8..79bccf3ac01 100644 --- a/test/javascripts/helpers/qunit_helpers.js +++ b/test/javascripts/helpers/qunit_helpers.js @@ -39,4 +39,11 @@ function asyncTestDiscourse(text, func) { func.call(self); }); }); -} \ No newline at end of file +} + +function fixture(selector) { + if (selector) { + return $("#qunit-fixture").find(selector); + } + return $("#qunit-fixture"); +}