mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +00:00
27 lines
654 B
TypeScript
27 lines
654 B
TypeScript
import { compatibleLegaoSchema } from '../../src/schema';
|
|
describe('Schema Ut', () => {
|
|
it('props', () => {
|
|
const schema = {
|
|
props: {
|
|
mobileSlot: {
|
|
type: "JSBlock",
|
|
value: {
|
|
componentName: "Slot",
|
|
children: [
|
|
{
|
|
loop: {
|
|
variable: "props.content",
|
|
type: "variable"
|
|
},
|
|
}
|
|
],
|
|
}
|
|
},
|
|
},
|
|
};
|
|
|
|
const result = compatibleLegaoSchema(schema);
|
|
expect(result).toMatchSnapshot();
|
|
expect(result.props.mobileSlot.value[0].loop.type).toBe('JSExpression');
|
|
});
|
|
}) |