提交 7318dae0 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: getApp

上级 d0217af5
......@@ -8,5 +8,6 @@ describe('getApp', () => {
await page.callMethod('_increasetLifeCycleNum')
const newData = await page.data()
expect(newData.lifeCycleNum - oldData.lifeCycleNum).toBe(100)
await page.callMethod('setLifeCycleNum', oldData.lifeCycleNum)
})
})
......@@ -8,7 +8,7 @@
</view>
</template>
<script lang="ts">
import { state } from '@/store/index.uts'
import { state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
......@@ -24,6 +24,10 @@ export default {
app.increasetLifeCycleNum()
this.lifeCycleNum = state.lifeCycleNum
},
// 自动化测试
setLifeCycleNum(num: number) {
setLifeCycleNum(num)
},
},
}
</script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册