刘光辉
3 小时以前 cf11e63b659afcc9792ab3e395f1b45d844431a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { describe, expect, it } from 'vitest';
 
import { defaultBtnsList, getDefaultBtnEvent } from '../config';
 
describe('batch print button configuration', () => {
  it('uses the builtin event modal configuration and preserves the original print action by default', () => {
    const button = defaultBtnsList.find((item) => item.value === 'batchPrint');
    const event = getDefaultBtnEvent('batchPrint');
 
    expect(button?.event).toMatchObject({
      customBtn: false,
      enableFunc: expect.any(String),
      func: expect.stringContaining('batchPrint(data)'),
    });
    expect(event).toMatchObject({
      customBtn: false,
      enableFunc: expect.any(String),
      func: expect.stringContaining('batchPrint(data)'),
    });
  });
});