miniprogram-setup
Version:
22 lines (17 loc) • 373 B
text/typescript
import { PageWithSetupForTesting } from '@tests/utils/convertingPageToComponent'
PageWithSetupForTesting({
setup() {
let count = 0
setTimeout(() => {
count++
})
const timerId = setInterval(() => {
count++
if (count >= 3)
clearInterval(timerId)
}, 1000)
return () => ({
count,
})
},
})