diff --git a/pages/API/inner-audio/inner-audio.test.js b/pages/API/inner-audio/inner-audio.test.js index 8538001be721977a23945a5ab6923390a9931be0..92389d6346fa93d5cb5e41fb87c333ac4a8fd982 100644 --- a/pages/API/inner-audio/inner-audio.test.js +++ b/pages/API/inner-audio/inner-audio.test.js @@ -22,7 +22,6 @@ describe('inner-audio', () => { await page.waitFor(async()=>{ return await getData('isCanplay') }) - console.log("获取缓冲信息",await getData('buffered')) expect(await getData('buffered')).toBeGreaterThan(0) }) @@ -31,7 +30,7 @@ describe('inner-audio', () => { await page.waitFor(3000); expect(await getData('isPlaying')).toBeTruthy() console.log("duration:",await getData('duration'),"currentTime:",await getData('currentTime')) - expect(await getData('duration')).toBe(175.109) + expect(await getData('duration')).toBeCloseTo(175.109, 0); // console.log("isPaused",await getData('isPaused')) // expect(await getData('currentTime')).toBeGreaterThan(0); // expect(await getData('isPaused')).toBeFalsy();