| 1234567891011121314151617181920212223242526272829303132333435 | 
							- /**
 
-  * 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: "0de7295862dd11e69faffa163e8aee56"
 
-     }
 
- };
 
- // 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(Object.keys(data).length > 0, "Do you forget finish the API?");
 
-                 done();
 
-             },
 
-             function (xhr, error, status) {
 
-                 assert.ok(false, xhr.responseJSON.message);
 
-                 done();
 
-             });
 
-         });
 
-     });
 
- });
 
 
  |