added browser tests, modified ci script, removed testing for version 0.90.x

This commit is contained in:
Spencer Alger
2014-01-10 11:23:08 -07:00
parent 3490479eee
commit 3223fb4a6d
20 changed files with 194 additions and 91 deletions

View File

@ -117,24 +117,34 @@ function YamlDoc(doc, file) {
expect(method).to.be.a('function');
if (_.isPlainObject(action.args)) {
action.name += ' ' + _.keys(action.args).join(', ');
action.name += '(' + JSON.stringify(action.args) + ')';
} else if (action.args) {
action.name += ' ' + action.args;
action.name += '(' + action.args + ')';
}
// wrap in a check for skipping
action.bound = _.bind(method, self, action.args);
// create a function that can be passed to
// create a function that can be passed to mocha or async
action.testable = function (done) {
if (self.skipping || self.file.skipping) {
return done();
}
if (method.length > 1) {
action.bound(done);
action.bound(function (err) {
if (err) {
err.message += ' in ' + action.name;
}
done(err);
});
} else {
action.bound();
done();
try {
action.bound();
done();
} catch (err) {
err.message += ' in ' + action.name;
done(err);
}
}
};