aboutsummaryrefslogtreecommitdiff
path: root/guidelines/wikipedia/specs/fixture_helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'guidelines/wikipedia/specs/fixture_helper.js')
-rw-r--r--guidelines/wikipedia/specs/fixture_helper.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/guidelines/wikipedia/specs/fixture_helper.js b/guidelines/wikipedia/specs/fixture_helper.js
new file mode 100644
index 0000000..7c278c1
--- /dev/null
+++ b/guidelines/wikipedia/specs/fixture_helper.js
@@ -0,0 +1,14 @@
+function fixture(html) {
+ var $article = $('#mw-content-text');
+ if ($article.length === 0) {
+ $article = $('<div id="mw-content-text"></div>');
+ $article.appendTo('body');
+ }
+ var $fix = $(html);
+ $article.append($fix);
+ return $fix;
+}
+
+function teardownFixtures() {
+ $('#mw-content-text').remove();
+}