mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
|
import { createLightApp } from '@midwayjs/mock';
|
||
|
import * as custom from '../src';
|
||
|
|
||
|
describe('/test/index.test.ts', () => {
|
||
|
it('test component', async () => {
|
||
|
const app = await createLightApp('', {
|
||
|
imports: [
|
||
|
custom
|
||
|
]
|
||
|
});
|
||
|
const bookService = await app.getApplicationContext().getAsync(custom.BookService);
|
||
|
expect(await bookService.getBookById()).toEqual('hello world');
|
||
|
});
|
||
|
});
|