mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
web: make real-time sync test more reliable
This commit is contained in:
@@ -39,9 +39,10 @@ async function actAndSync<T>(
|
||||
) {
|
||||
const results = await Promise.all([
|
||||
...actions.filter((a) => !!a),
|
||||
...devices.map((d) => d.waitForSync("synced", "now")),
|
||||
...devices.map((d) => d.page.waitForTimeout(1000))
|
||||
...devices.map((d) => d.waitForSync("synced", "now"))
|
||||
]);
|
||||
|
||||
await Promise.all(devices.map((d) => d.page.waitForTimeout(2000)));
|
||||
return results.slice(0, actions.length) as T[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user