From 167d4ea37098408d7ffa7a3c4c610dbdabffb786 Mon Sep 17 00:00:00 2001 From: Christoph Guttandin Date: Fri, 20 Sep 2024 14:48:18 +0200 Subject: [PATCH] test: use isSupported() to wait for all memoized values --- test/memory/module.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/memory/module.js b/test/memory/module.js index 9b67c73f..44dee31f 100644 --- a/test/memory/module.js +++ b/test/memory/module.js @@ -89,10 +89,10 @@ describe('module', () => { await page.evaluate(async () => { new GainNode(audioContext); // eslint-disable-line no-undef - await new Promise((resolve) => { - setTimeout(resolve, 1000); - }); + await isSupported(); // eslint-disable-line no-undef }); + + await page.evaluate(() => gc()); // eslint-disable-line no-undef }); describe('with unconnected GainNodes', () => { @@ -186,10 +186,10 @@ describe('module', () => { await page.evaluate(async () => { new AudioBufferSourceNode(audioContext); // eslint-disable-line no-undef - await new Promise((resolve) => { - setTimeout(resolve, 1000); - }); + await isSupported(); // eslint-disable-line no-undef }); + + await page.evaluate(() => gc()); // eslint-disable-line no-undef }); describe('with unconnected AudioBufferSourceNodes', () => {