刘光辉
4 小时以前 cf11e63b659afcc9792ab3e395f1b45d844431a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { describe, expect, it } from 'vitest';
 
import { inputComponents, selectComponents } from './componentMap';
 
describe('design table component', () => {
  it('does not require rows by default', () => {
    const table = selectComponents.find((item) => item.__config__.jnpfKey === 'table');
 
    expect(table?.__config__).toMatchObject({
      defaultValue: [],
      required: false,
    });
  });
});
 
describe('upload file component', () => {
  it('keeps the qianpiye annotator disabled by default', () => {
    const upload = inputComponents.find((item) => item.__config__.jnpfKey === 'uploadFile');
 
    expect(upload).toMatchObject({ onlineEdit: false, qianpiyeAnnotatorEnabled: false });
  });
});