miniprogram-setup
Version:
25 lines (21 loc) • 438 B
text/typescript
import { PageWithSetupForTesting } from '@tests/utils/convertingPageToComponent'
PageWithSetupForTesting({
setup() {
let status = 'pending'
wx.request({
url: 'test',
success: () => {
status = 'success'
},
fail: () => {
status = 'fail'
},
complete: () => {
status = 'complete'
},
})
return () => ({
status,
})
},
})