[improvement] List: fix typo in test cases

This commit is contained in:
陈嘉涵 2019-06-06 17:49:10 +08:00
parent 34923c7513
commit 094380416e
2 changed files with 4 additions and 4 deletions

View File

@ -108,11 +108,11 @@ export default sfc({
}, },
render(h) { render(h) {
const placeholder = <div ref="placeholder" class={bem('placeholder')}/>; const Placeholder = <div ref="placeholder" class={bem('placeholder')}/>;
return ( return (
<div class={bem()} role="feed" aria-busy={this.loading}> <div class={bem()} role="feed" aria-busy={this.loading}>
{this.direction === 'down' ? this.slots() : placeholder} {this.direction === 'down' ? this.slots() : Placeholder}
{this.loading && ( {this.loading && (
<div class={bem('loading')} key="loading"> <div class={bem('loading')} key="loading">
{this.slots('loading') || ( {this.slots('loading') || (
@ -128,7 +128,7 @@ export default sfc({
{this.errorText} {this.errorText}
</div> </div>
)} )}
{this.direction === 'up' ? this.slots() : placeholder} {this.direction === 'up' ? this.slots() : Placeholder}
</div> </div>
); );
} }

View File

@ -116,7 +116,7 @@ test('keep-alive live cycle', () => {
expect(wrapper.vm.$el).toBeTruthy(); expect(wrapper.vm.$el).toBeTruthy();
wrapper.vm.show = false; 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 () => { test('check the case that scroller is not window', async () => {