添加 eggjs web-server,初步支持多宝短信
This commit is contained in:
16
web-server/test/app/service/Test.test.ts
Normal file
16
web-server/test/app/service/Test.test.ts
Normal file
@@ -0,0 +1,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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user