aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-26 10:56:28 +0200
committerJames Lal <james@lightsofapollo.com>2012-06-26 10:56:28 +0200
commit71d0d24e03e439c347d9d3d809af65d2064b1427 (patch)
treeefef812815e4aa1ce86578a97b9c1a5c83007d76
parentd9ef427fa799bc31700ab3d604b88ed663a4c128 (diff)
downloadjsCalDAV-71d0d24e03e439c347d9d3d809af65d2064b1427.tar.gz
move bunch of requires for abstract into a helper
-rw-r--r--test/helper.js14
-rw-r--r--test/webcals/request/abstract_test.js5
2 files changed, 15 insertions, 4 deletions
diff --git a/test/helper.js b/test/helper.js
index 436f8d2..f568bf8 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -48,5 +48,19 @@
}
}
+ requireRequest = function(callback) {
+ requireLib('xhr');
+ requireLib('sax');
+ requireLib('request/abstract');
+ requireLib('template');
+ requireSupport('fake_xhr');
+
+
+ //in the future we need a callback for browser support.
+ if (typeof(callback) !== 'undefined') {
+ callback();
+ }
+ };
+
}());
diff --git a/test/webcals/request/abstract_test.js b/test/webcals/request/abstract_test.js
index 23bfa8c..124a135 100644
--- a/test/webcals/request/abstract_test.js
+++ b/test/webcals/request/abstract_test.js
@@ -1,7 +1,4 @@
-requireLib('xhr');
-requireLib('sax');
-requireLib('request/abstract');
-requireSupport('fake_xhr');
+requireRequest();
suite('webcals/request/abstract.js', function() {
var subject;