From 85a9aca4921145a353dee5d9d044bb3326381dc2 Mon Sep 17 00:00:00 2001 From: wangxueliang Date: Tue, 11 Sep 2018 09:14:57 +0800 Subject: [PATCH] fix: the spin component loads for the first time #174 --- components/list/__tests__/index.test.js | 19 +++++++++++++++++++ components/spin/Spin.jsx | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 10 ++++++++-- components/transfer/demo/large-data.md | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 components/list/__tests__/index.test.js diff --git a/components/list/__tests__/index.test.js b/components/list/__tests__/index.test.js new file mode 100644 index 000000000..32851c688 --- /dev/null +++ b/components/list/__tests__/index.test.js @@ -0,0 +1,19 @@ +import { mount } from '@vue/test-utils' +import { asyncExpect } from '@/tests/utils' +import List from '..' + +describe('List', () => { + it('locale not passed to internal div', async () => { + const locale = { emptyText: 'Custom text' } + const wrapper = mount({ + render () { + return {item}} locale={locale} /> + }, + }, { + sync: false, + }) + await asyncExpect(() => { + expect(wrapper.props().locale).toBe(undefined) + }) + }) +}) diff --git a/components/spin/Spin.jsx b/components/spin/Spin.jsx index f8db9e9a6..7da91b8a0 100644 --- a/components/spin/Spin.jsx +++ b/components/spin/Spin.jsx @@ -148,7 +148,7 @@ export default { return ( diff --git a/components/transfer/__tests__/__snapshots__/demo.test.js.snap b/components/transfer/__tests__/__snapshots__/demo.test.js.snap index 034fa58e1..ef2725e51 100644 --- a/components/transfer/__tests__/__snapshots__/demo.test.js.snap +++ b/components/transfer/__tests__/__snapshots__/demo.test.js.snap @@ -140,7 +140,10 @@ exports[`renders ./components/transfer/demo/large-data.md correctly 1`] = `
2000 items
-
+