UNPKG

miniprogram-setup

Version:
22 lines (17 loc) 373 B
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, }) }, })