amis-rpc-design/libs/amis/packages/office-viewer/__tests__/util/autoSpace.test.ts

10 lines
260 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import {cjkspace} from '../../src/util/autoSpace';
test('autoSpace', async () => {
expect(cjkspace('a中'.split(''))).toBe('a 中');
});
test('autoSpace 2', async () => {
expect(cjkspace('abc中def测试'.split(''))).toBe('abc 中 def测试');
});