13 KiB

Snapshot report for test/Materialize.ts

The actual snapshot is saved in Materialize.ts.snap.

Generated by AVA.

materialize multiple exported component by local

Snapshot 1

[
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakeBlank',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakeBlank',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'styleLayout',
          propType: 'object',
        },
        {
          name: 'styleBackground',
          propType: 'object',
        },
        {
          name: 'styleFlexLayout',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
        {
          name: 'id',
          propType: 'string',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakeIcon',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakeIcon',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          name: 'className',
          propType: 'string',
        },
        {
          name: 'iconClassName',
          propType: 'string',
        },
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'styleText',
          propType: 'object',
        },
        {
          name: 'styleBackground',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakeImage',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakeImage',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakeLink',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakeLink',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'styleText',
          propType: 'object',
        },
        {
          name: 'styleLayout',
          propType: 'object',
        },
        {
          name: 'styleBackground',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakePlaceholder',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakePlaceholder',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'styleLayout',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'AIMakeText',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'AIMakeText',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
        {
          name: 'type',
          propType: 'string',
        },
        {
          name: 'styleBoxModel',
          propType: 'object',
        },
        {
          name: 'styleText',
          propType: 'object',
        },
        {
          name: 'styleLayout',
          propType: 'object',
        },
        {
          name: 'styleBackground',
          propType: 'object',
        },
        {
          name: 'style',
          propType: 'object',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'Root',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'Root',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js',
        package: 'multiple-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          name: 'style',
          propType: 'object',
        },
        {
          isRequired: undefined,
          name: 'children',
          propType: 'union',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
]

materialize single exported component by local

Snapshot 1

[
  {
    manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json',
    manifestJS: undefined,
    manifestObj: {
      componentName: 'Demo',
      docUrl: '',
      npm: {
        destructuring: false,
        exportName: 'Demo',
        main: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js',
        package: 'single-exported-component',
        subName: '',
        version: '1.0.0',
      },
      props: [
        {
          name: 'optionalArray',
          propType: 'array',
        },
        {
          name: 'optionalBool',
          propType: 'bool',
        },
        {
          name: 'optionalFunc',
          propType: 'func',
        },
        {
          name: 'optionalNumber',
          propType: 'number',
        },
        {
          name: 'optionalObject',
          propType: 'object',
        },
        {
          name: 'optionalString',
          propType: 'string',
        },
        {
          name: 'optionalSymbol',
          propType: 'symbol',
        },
        {
          name: 'optionalNode',
          propType: 'node',
        },
        {
          name: 'optionalElement',
          propType: 'element',
        },
        {
          name: 'optionalElementType',
          propType: 'elementType',
        },
        {
          isRequired: undefined,
          name: 'optionalMessage',
          propType: 'instanceOf',
        },
        {
          0: '\'News\'',
          1: '\'Photos\'',
          name: 'optionalEnum',
        },
        {
          isRequired: undefined,
          name: 'optionalUnion',
          propType: 'union',
        },
        {
          isRequired: undefined,
          name: 'optionalArrayOf',
          propType: 'arrayOf',
        },
        {
          isRequired: undefined,
          name: 'optionalObjectOf',
          propType: 'objectOf',
        },
        {
          name: 'optionalObjectWithShape',
          propType: 'shape',
          value: [
            {
              isRequired: false,
              name: 'optionalProperty',
              propType: 'string',
            },
            {
              isRequired: true,
              name: 'requiredProperty',
              propType: 'number',
            },
          ],
        },
        {
          name: 'optionalObjectWithShape2',
          propType: 'shape',
          value: [
            {
              isRequired: false,
              name: 'optionalProperty',
              propType: 'string',
            },
            {
              isRequired: true,
              name: 'requiredProperty',
              propType: 'number',
            },
          ],
        },
        {
          name: 'optionalObjectWithStrictShape',
          propType: 'exact',
          value: [
            {
              isRequired: false,
              name: 'optionalProperty',
              propType: 'string',
            },
            {
              isRequired: true,
              name: 'requiredProperty',
              propType: 'number',
            },
          ],
        },
        {
          name: 'requiredFunc',
          propType: 'func',
        },
        {
          name: 'requiredAny',
          propType: 'any',
        },
      ],
      screenshot: '',
      title: '',
    },
  },
]