/** * IM客户端单元测试。单元测试编写规则:至少对对每个接口执行正反例测试,若有条件可以增加接口的性能测试。 * * @author sand * @since 2016/12/24 */ "use strict"; var $ = require('jquery'); let assert = require('assert'); let imClient = require('../../src/client/im.client'); // 测试会话用的数据, test data let TD = { DoctorA: { id: "D2016008240003" } }; // Application API describe("Application API", function () { describe("getBadgeNo", function () { it("return success when with valid user", function (done) { imClient.Application.getBadgeNo(TD.DoctorA.id, function (data) { assert.ok(data.count >= 0, "Do you forget finish the API?"); done(); }, function (xhr, error, status) { assert.ok(false, xhr.responseJSON.message); done(); }); }); }); });