HelloService.test.ts 412 B

1234567891011
  1. import assert from 'assert';
  2. import { app } from 'egg-mock/bootstrap';
  3. import { HelloService } from '@/module/foo/service/HelloService';
  4. describe('test/app/module/foo/service/HelloService.test.js', () => {
  5. it('should hello work', async () => {
  6. const helloService = await app.getEggObject(HelloService);
  7. const msg = await helloService.hello('123456');
  8. assert.equal(msg, 'hello, 123456');
  9. });
  10. });