diff --git a/packages/locale/__test__/locale.spec.ts b/packages/locale/__test__/locale.spec.ts index 8823195241..e06121e96c 100644 --- a/packages/locale/__test__/locale.spec.ts +++ b/packages/locale/__test__/locale.spec.ts @@ -2,6 +2,7 @@ import { mount } from '@vue/test-utils' import { t, use } from '../index' import localeMixin from '../mixin' import zhCn from '../lang/zh-CN' +import en from '../lang/en' describe('Locale', () => { test('t', () => { @@ -15,13 +16,14 @@ describe('Locale', () => { test('use', () => { use(zhCn) expect(t('el.popconfirm.confirmButtonText')).toBe('确定') + use(en) }) test('mixin', () => { const component = { template: `

{{ t('el.popconfirm.cancelButtonText') }}

`, mixins: [localeMixin], - } + } as any const wrapper = mount(component) expect(wrapper.text()).toContain('No') })