From 094380416e726c598893cace7540e34006dd0326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 6 Jun 2019 17:49:10 +0800 Subject: [PATCH] [improvement] List: fix typo in test cases --- packages/list/index.js | 6 +++--- packages/list/test/index.spec.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/list/index.js b/packages/list/index.js index 186877695..6beb271b9 100644 --- a/packages/list/index.js +++ b/packages/list/index.js @@ -108,11 +108,11 @@ export default sfc({ }, render(h) { - const placeholder =
; + const Placeholder =
; return (
- {this.direction === 'down' ? this.slots() : placeholder} + {this.direction === 'down' ? this.slots() : Placeholder} {this.loading && (
{this.slots('loading') || ( @@ -128,7 +128,7 @@ export default sfc({ {this.errorText}
)} - {this.direction === 'up' ? this.slots() : placeholder} + {this.direction === 'up' ? this.slots() : Placeholder}
); } diff --git a/packages/list/test/index.spec.js b/packages/list/test/index.spec.js index dfb5e2f1a..04a39c73f 100644 --- a/packages/list/test/index.spec.js +++ b/packages/list/test/index.spec.js @@ -116,7 +116,7 @@ test('keep-alive live cycle', () => { expect(wrapper.vm.$el).toBeTruthy(); wrapper.vm.show = false; - expect(wrapper.vm.el).toBeFalsy(); + expect(wrapper.vm.$el.nodeType).toEqual(Node.COMMENT_NODE); }); test('check the case that scroller is not window', async () => {