Skip to content

Commit

Permalink
test(umi-plugin): init unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
BroKun authored and sunshinesmilelk committed Aug 21, 2024
1 parent 690a2aa commit 7b41806
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions packages/umi-plugin-mana/src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
import assert from 'assert';

import { pageContent } from './mana-runtime';

describe('umi-plugin-mana', () => {
it('#base', async () => {
assert(true);
it('#page content', async () => {
assert(
pageContent('my-slot') ===
`(async () => {
const { Slot } = await import('@difizen/mana-app');
const { Outlet } = await import('umi');
const Page = ({ children, ...props }) => {
return (
<Slot name="my-slot" viewProps={props}>
<Outlet />
</Slot>
);
};
return Page
})()
`,
);
});
});

0 comments on commit 7b41806

Please sign in to comment.