compress-video.test.js 739 字节
Newer Older
1 2
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-compressVideo', () => {
3 4 5 6 7 8 9
  if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith('ios')) {
    it('pass', async () => {
      expect(1).toBe(1);
    });
    return;
  }

10 11 12 13 14 15 16 17 18 19 20 21
  let page;
  beforeAll(async () => {
    page = await program.reLaunch('/pages/API/compress-video/compress-video');
    await page.waitFor(500);
  });

  it('test compressVideo', async () => {
    await page.callMethod('testCompressVideo');
    await page.waitFor(3000);
    expect(await page.data('videoInfoForTest')).toEqual({
      width: 640,
      height: 360,
22
      // isSizeReduce: true
23 24 25
    });
  });
});