sms.test.js 463 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Mai
  6. * @date
  7. * @version
  8. */
  9. const { app, assert } = require('egg-mock/bootstrap');
  10. const SMS = require('../../../app/lib/sms');
  11. describe('test/app/lib/sms.test.js', () => {
  12. it('send message success', function* () {
  13. const ctx = app.mockContext();
  14. const sms = new SMS(ctx);
  15. const result = sms.send('15916260139', '测试短信发送');
  16. // 验证返回
  17. assert(result);
  18. });
  19. });