/** * IM客户端单元测试。单元测试编写规则:至少对对每个接口执行正反例测试,若有条件可以增加接口的性能测试。 * * @author sand * @since 2016/12/24 */ let assert = require('assert'); // 测试会话用的数据 let Sessions = { MUC: { SessionId: "", Topics: [], DoctorA: "", DoctorB: "", Patient: "" }, P2P: { SessionId: "", DoctorA: "", DoctorB: "" }, Group: { SessionId: "", DoctorA: "", DoctorB: "", DoctorC: "", DoctorD: "" } }; describe("IM SDK Unit Test", function () { /** * 用户API。测试范围: * 1 有效/无效用户ID登录/状态更新/退出 */ describe("User API", function () { describe("login", function () { it("should be 200 with valid user", function (done) { done(); }); it("should be 404 with invalid user", function (done) { done(); }); }); describe("user status", function () { it("should be 200 with valid user", function (done) { done(); }); it("should be 404 with invalid user", function (done) { done(); }); }); describe("logout", function () { it("should be 200 with valid user", function (done) { done(); }); it("should be 404 with invalid user", function (done) { done(); }); }); }); // Application API describe("Application API", function () { describe("get badge no", function () { it("should be 200 when with valid user", function (done) { done(); }); }); }); // 会话API describe("Session API", function () { describe("get sessions", function () { it("should be 200 when user login yet.", function (done) { done(); }); }); }); // 健康API describe("Health API", function () { describe("health", function () { it("should be 200 when system is allright", function (done) { done(); }); }); }); // 管理API describe("Management API", function () { describe("db_status", function () { it("should be 200 while database is ok", function (done) { done(); }); }); }); });