kopia lustrzana https://github.com/c9/core
refactor test to use mocha
rodzic
259a0f36b6
commit
4740a031cb
|
@ -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();
|
Ładowanie…
Reference in New Issue