cool-admin-midway/packages/iot/test/index.test.ts

15 lines
418 B
TypeScript
Raw Normal View History

2023-04-04 09:15:48 +08:00
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');
});
});