mirror of
https://github.com/zh-lx/pinyin-pro.git
synced 2026-03-13 09:51:38 +08:00
15 lines
422 B
JavaScript
15 lines
422 B
JavaScript
import { pinyin } from '../lib/index';
|
|
import { expect, describe, it } from 'vitest';
|
|
|
|
describe('removeNonZh', () => {
|
|
it('[removeNonZh]mix', () => {
|
|
const result = pinyin('汉sa语2拼音', { removeNonZh: true });
|
|
expect(result).to.be.equal('hàn yǔ pīn yīn');
|
|
});
|
|
|
|
it('[removeNonZh]none', () => {
|
|
const result = pinyin('saf21a', { removeNonZh: true });
|
|
expect(result).to.be.equal('');
|
|
});
|
|
});
|