1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| import * as assert from 'assert';
| import { Context } from 'egg';
| import { app } from 'egg-mock/bootstrap';
|
| describe('test/app/service/Test.test.js', () => {
| let ctx: Context;
|
| before(async () => {
| ctx = app.mockContext();
| });
|
| it('sayHi', async () => {
| const result = await ctx.service.test.sayHi('egg');
| assert(result === 'hi, egg');
| });
| });
|
|