diff --git a/pages/API/get-app/get-app.test.js b/pages/API/get-app/get-app.test.js
index ef9dffd05c73eca6f9fd9e853ccaf8bde7c2ae75..c8306e5250b969f81a0be62a90dda64f827011fe 100644
--- a/pages/API/get-app/get-app.test.js
+++ b/pages/API/get-app/get-app.test.js
@@ -1,4 +1,6 @@
const PAGE_PATH = '/pages/API/get-app/get-app'
+const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
+const isAndroid = platformInfo.startsWith('android')
describe('getApp', () => {
let page = null
@@ -46,9 +48,9 @@ describe('getApp', () => {
const newLifeCycleNum = await page.data('lifeCycleNum')
expect(newLifeCycleNum - oldLifeCycleNum).toBe(100)
await page.callMethod('setLifeCycleNum', oldLifeCycleNum)
- })
- it('getAndroidApplication', async () => {
- const res = await page.callMethod('checkGetAndroidApplication')
- expect(res).toBe(true)
})
-})
+ it('getAndroidApplication', async () => {
+ const res = await page.callMethod('getAndroidApplication')
+ expect(res).toBe(isAndroid)
+ })
+})
diff --git a/pages/API/get-app/get-app.uvue b/pages/API/get-app/get-app.uvue
index 2cdf2e5023e9b23824f72934e8113b908ea511dc..f1c2b08aa3ea7fbf2300ceb0516ed31bd5447c7d 100644
--- a/pages/API/get-app/get-app.uvue
+++ b/pages/API/get-app/get-app.uvue
@@ -35,13 +35,14 @@
点击按钮调用 App.uvue methods
increasetLifeCycleNum 方法
-