From af423b1c7f20c914d52832e378e99633396ce7d2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 3 Sep 2020 12:17:01 +0200 Subject: [PATCH] ensure second promise has run in test --- src/utils/Lock.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/Lock.js b/src/utils/Lock.js index 21d5d7a2..6a198097 100644 --- a/src/utils/Lock.js +++ b/src/utils/Lock.js @@ -67,15 +67,15 @@ export function tests() { const lock = new Lock(); lock.take(); - let first = false; + let first; lock.released().then(() => first = lock.take()); - let second = false; + let second; lock.released().then(() => second = lock.take()); const promise = lock.released(); lock.release(); await promise; - assert.equal(first, true); - assert.equal(second, false); + assert.strictEqual(first, true); + assert.strictEqual(second, false); }, "await non-taken lock": async assert => { const lock = new Lock();