aboutsummaryrefslogtreecommitdiffstats
path: root/test/helper.js
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-19 14:01:01 -0700
committerJames Lal <james@lightsofapollo.com>2012-06-19 14:01:01 -0700
commit936e76b8945c6f310ad893905e08728715620e38 (patch)
tree39c969cb8739e26e3c4f628b50f1afffa8330dcc /test/helper.js
parentf1ae9e6f2a4503b9c5ab55abb13d95cbd9ee753c (diff)
downloadjsCalDAV-936e76b8945c6f310ad893905e08728715620e38.tar.gz
v1 sax parser
Diffstat (limited to 'test/helper.js')
-rw-r--r--test/helper.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/helper.js b/test/helper.js
index b36aeeb..d5ac7a0 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -4,10 +4,6 @@ var chai = require('chai'),
chai.Assertion.includeStack = true;
assert = chai.assert;
-globalNS = {
- require: require
-};
-
loadSample = function(file, cb) {
var root = __dirname + '/../samples/';
fs.readFile(root + file, 'utf8', function(err, contents) {
@@ -15,6 +11,20 @@ loadSample = function(file, cb) {
});
};
+defineSample = function(file, cb) {
+ suiteSetup(function(done) {
+ loadSample(file, function(err, data) {
+ if (err) {
+ done(err);
+ }
+ cb(data);
+ done();
+ });
+ });
+};
+
requireLib = function(lib) {
return require(__dirname + '/../lib/webcals/' + lib);
};
+
+Webcals = require('../lib/webcals/webcals.js');