mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test(CountDown): fix test warning (#8046)
This commit is contained in:
parent
0d7ff429d9
commit
f5381e4f5a
@ -1,4 +1,4 @@
|
|||||||
import { nextTick } from 'vue';
|
import { KeepAlive, nextTick } from 'vue';
|
||||||
import CountDown from '..';
|
import CountDown from '..';
|
||||||
import { mount, later } from '../../../test';
|
import { mount, later } from '../../../test';
|
||||||
|
|
||||||
@ -178,11 +178,13 @@ test('should format S milliseconds correctly', () => {
|
|||||||
|
|
||||||
test('should pause counting when deactivated', async () => {
|
test('should pause counting when deactivated', async () => {
|
||||||
const wrapper = mount({
|
const wrapper = mount({
|
||||||
template: `
|
render() {
|
||||||
<keep-alive>
|
return (
|
||||||
<van-count-down v-if="render" ref="countDown" time="100" />
|
<KeepAlive>
|
||||||
</keep-alive>
|
{this.render ? <CountDown ref="countDown" time="10000" /> : null}
|
||||||
`,
|
</KeepAlive>
|
||||||
|
);
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
render: true,
|
render: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user