提交 89321c19 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 修复 onLoad.test.js 影响 lifeCycleNum 问题

上级 5931b8e3
...@@ -263,6 +263,12 @@ ...@@ -263,6 +263,12 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/API/navigator/new-page/new-page-3",
"style": {
"navigationBarTitleText": "新页面-3"
}
},
{ {
"path": "pages/API/navigator/new-page/onLoad", "path": "pages/API/navigator/new-page/onLoad",
"style": { "style": {
......
<template>
<view class="uni-padding-wrap">
<page-head title="new-page-3" />
</view>
</template>
jest.setTimeout(20000); jest.setTimeout(20000);
const PAGE_PATH = "/pages/API/navigator/new-page/onLoad"; const PAGE_PATH = "/pages/API/navigator/new-page/onLoad";
const INTERMEDIATE_PAGE_PATH = "/pages/API/navigator/new-page/new-page-1"; const INTERMEDIATE_PAGE_PATH = "/pages/API/navigator/new-page/new-page-1";
const TARGET_PAGE_PATH = "/pages/API/navigator/new-page/new-page-2"; const TARGET_PAGE_PATH = "/pages/API/navigator/new-page/new-page-3";
let page; let page;
describe("onLoad", () => { describe("onLoad", () => {
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}, },
navigateTo(){ navigateTo(){
uni.navigateTo({ uni.navigateTo({
url: '/pages/API/navigator/new-page/new-page-2' url: '/pages/API/navigator/new-page/new-page-3'
}) })
}, },
navigateBack(){ navigateBack(){
...@@ -69,12 +69,12 @@ export default { ...@@ -69,12 +69,12 @@ export default {
}, },
redirectTo(){ redirectTo(){
uni.redirectTo({ uni.redirectTo({
url: '/pages/API/navigator/new-page/new-page-2' url: '/pages/API/navigator/new-page/new-page-3'
}) })
}, },
reLaunch(){ reLaunch(){
uni.reLaunch({ uni.reLaunch({
url: '/pages/API/navigator/new-page/new-page-2' url: '/pages/API/navigator/new-page/new-page-3'
}) })
}, },
switchTab(){ switchTab(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册