From 4d7bfa11b8b8cda806980b63a6afb1511f2b9041 Mon Sep 17 00:00:00 2001 From: Mark Henderson Date: Mon, 18 May 2020 11:16:53 -0400 Subject: [PATCH] cleaning up setTimeouts --- test/custom-cache.test.js | 9 +++------ test/custom-keystore.test.js | 8 +++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/test/custom-cache.test.js b/test/custom-cache.test.js index 567ffff..f01b50c 100644 --- a/test/custom-cache.test.js +++ b/test/custom-cache.test.js @@ -44,12 +44,9 @@ Object.keys(testAPIs).forEach(API => { }) }) - after(() => { - // FIXME: shim to wait until the end of the event loop to call this - setTimeout(async () => { - await orbitdb1.stop() - await stopIpfs(ipfsd) - }, 0) + after(async () => { + await orbitdb1.stop() + await stopIpfs(ipfsd) }) describe('allows orbit to use a custom cache with different store types', function() { diff --git a/test/custom-keystore.test.js b/test/custom-keystore.test.js index 3e9c674..6e000d9 100644 --- a/test/custom-keystore.test.js +++ b/test/custom-keystore.test.js @@ -42,11 +42,9 @@ Object.keys(testAPIs).forEach(API => { }) }) - after(() => { - setTimeout(async () => { - await orbitdb1.stop() - await stopIpfs(ipfsd) - }, 0) + after(async () => { + await orbitdb1.stop() + await stopIpfs(ipfsd) }) describe('allows orbit to use a custom keystore with different store types', function() {