mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
41655b6847
* chore(project): adding a script for upgrading vue version * Update locale.spec.ts Co-authored-by: zazzaz <izazzaz@hotmail.com>
20 lines
442 B
TypeScript
20 lines
442 B
TypeScript
import { t, use } from '../index'
|
|
import zhCn from '../lang/zh-cn'
|
|
import en from '../lang/en'
|
|
|
|
describe('Locale', () => {
|
|
test('t', () => {
|
|
expect(t('el.popconfirm.confirmButtonText')).toBe('Yes')
|
|
})
|
|
|
|
test('return key name if not defined', () => {
|
|
expect(t('el.popconfirm.someThing')).toBeUndefined()
|
|
})
|
|
|
|
test('use', () => {
|
|
use(zhCn)
|
|
expect(t('el.popconfirm.confirmButtonText')).toBe('确定')
|
|
use(en)
|
|
})
|
|
})
|