diff --git a/pages/component/swiper/swiper2.test.js b/pages/component/swiper/swiper2.test.js index a1a7804749edd5d80f4e028dee5a3481c5f99b28..229d8677b164f51675f08ca1dc8daa7e97cf9423 100644 --- a/pages/component/swiper/swiper2.test.js +++ b/pages/component/swiper/swiper2.test.js @@ -1,20 +1,22 @@ -const PAGE_PATH = '/pages/component/swiper/swiper' - -describe('swiper-touch-test', () => { +const PAGE_PATH = '/pages/component/swiper/swiper' - // 屏蔽 web 平台 - if (process.env.uniTestPlatformInfo.startsWith('web')) { +describe('swiper-touch-test', () => { +const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() +const isAndroid = platformInfo.startsWith('android') +const isWeb = platformInfo.startsWith('web') + // 屏蔽 web * android 平台 + if (isWeb || isAndroid) { it('other platform', () => { expect(1).toBe(1) }) return } - - let page - beforeAll(async () => { - page = await program.reLaunch(PAGE_PATH) - await page.waitFor(1500); - }) + + let page + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor(1500); + }) it('swiper-touch-test', async () => { @@ -33,5 +35,5 @@ describe('swiper-touch-test', () => { console.log(val) expect(val).toEqual(1) }) - + })