'use strict'; /** * * * @author Mai * @date * @version */ const { app, assert } = require('egg-mock/bootstrap'); const SMS = require('../../../app/lib/sms'); describe('test/app/lib/sms.test.js', () => { it('send message success', function* () { const ctx = app.mockContext(); const sms = new SMS(ctx); const result = sms.send('15916260139', '测试短信发送'); // 验证返回 assert(result); }); });