refactor test to use mocha

pull/85/head
Matthijs van Henten 2015-04-14 13:50:11 +00:00
rodzic 259a0f36b6
commit 4740a031cb
1 zmienionych plików z 54 dodań i 68 usunięć

Wyświetl plik

@ -10,20 +10,21 @@ var http = require("http");
var frontdoor = require("../frontdoor");
var createClient = require("./api-client");
module.exports = {
require("c9/inline-mocha")(module);
require("amd-loader");
"test client/server integration": function(next) {
it("test client/server integration", function(next){
this.getUsers = function(params, callback) {
console.log(params)
callback(null, [{
id: 1,
name: "fjakobs",
first: params.first
}]);
};
this.addUser = sinon.stub();
this.getUser = function(params, callback) {
console.log(params)
callback(null, {
id: params.uid,
name: "fjakobs"
@ -73,20 +74,5 @@ module.exports = {
});
});
});
},
});
// ">test real API server": function(next) {
// createClient("http://127.0.0.1:8081/api.json", function(err, client) {
// assert.equal(err, null);
// console.log(err, Object.keys(client), client.vfs);
// client.vfs.get(function(err, res) {
// console.log(err, res);
// assert.equal(err, null);
// next();
// })
// });
// }
};
!module.parent && require("asyncjs").test.testcase(module.exports).exec();