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

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

上级 ba25807d
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)
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册