| 123456789101112131415161718192021222324252627282930 | /** * Created by Sand Wen on 2016.11.18. */var assert = require('assert');var StatsMessage = require('../../../src/doctor/models/stats.js');describe('StatsMessage class', function () {    describe('When test constructor', function () {        it('should return the object', function () {            var sm = new StatsMessage();            assert.strictEqual(sm !== null, true);        });    });    describe('getBadgeNumber', function () {        describe('When the data is ready', function () {            it('should get "ok" event', function () {                var sm = new StatsMessage();                sm.on('ok', function (data) {                    console.log(data);                    assert.strictEqual(data.length > 0, true);                });                sm.getBadgeNumber("sand");            });        });    });});
 |