提交 9bd92352 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test(swiper): 规避未兼容平台

上级 ba25807d
const PAGE_PATH = '/pages/component/swiper/swiper' const PAGE_PATH = '/pages/component/swiper/swiper'
describe('swiper-touch-test', () => {
// 屏蔽 web 平台 describe('swiper-touch-test', () => {
if (process.env.uniTestPlatformInfo.startsWith('web')) { const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isAndroid = platformInfo.startsWith('android')
const isWeb = platformInfo.startsWith('web')
// 屏蔽 web * android 平台
if (isWeb || isAndroid) {
it('other platform', () => { it('other platform', () => {
expect(1).toBe(1) expect(1).toBe(1)
}) })
return return
} }
let page let page
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH) page = await program.reLaunch(PAGE_PATH)
await page.waitFor(1500); await page.waitFor(1500);
}) })
it('swiper-touch-test', async () => { it('swiper-touch-test', async () => {
...@@ -33,5 +35,5 @@ describe('swiper-touch-test', () => { ...@@ -33,5 +35,5 @@ describe('swiper-touch-test', () => {
console.log(val) console.log(val)
expect(val).toEqual(1) expect(val).toEqual(1)
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册