123456789101112131415161718192021222324252627 |
- /**
- * IM客户端单元测试。单元测试编写规则:至少对对每个接口执行正反例测试,若有条件可以增加接口的性能测试。
- *
- * @author sand
- * @since 2016/12/24
- */
- "use strict";
- var $ = require('jquery');
- let assert = require('assert');
- let imClient = require('../../src/client/im.client');
- // 管理API
- describe("Management API", function () {
- describe("db_status", function () {
- it("return success while database is ok", function (done) {
- imClient.Management.getDbStatus(function (data) {
- assert.strictEqual(Object.keys(data).length > 0, true);
- done();
- },
- function (xhr, status, error) {
- assert.ok(false, xhr.responseJSON.message);
- done();
- });
- });
- });
- });
|