amis2/packages/ooxml-viewer/__tests__/util/autoSpace.test.ts
吴多益 ef9ada9783
feat: office-viewer 支持 sdt、footnote、endnote,包名换成 ooxml-viewer (#6509)
* 支持嵌套 sdt

* 初步支持 footnote 和 endnote

* 修复默认展示问题

* 初步支持 footnote 和 endnote

* 换包名
2023-04-03 12:53:44 +08:00

10 lines
260 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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测试');
});