request-animation-frame.test.js 479 字节
Newer Older
1
const PAGE_PATH = '/pages/API/request-animation-frame/request-animation-frame'
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

describe('API-requestAnimationFrame', () => {
  let page
  beforeAll(async () => {
    page = await program.reLaunch(PAGE_PATH)
    await page.waitFor(600);
  });

  it('requestAnimationFrame', async () => {
    await page.callMethod('startRequestAnimationFrame')
    await page.waitFor(100)
    const data = await page.data()
    expect(data.testFrameCount > 0).toBe(true)
  });
});