From: Jérôme Benoit Date: Sun, 4 Aug 2024 18:47:59 +0000 (+0200) Subject: test: refine AsyncLock runExclusive() expectation X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bff96f3a942ee6ff5f85926683440945017ffeab;p=e-mobility-charging-stations-simulator.git test: refine AsyncLock runExclusive() expectation Signed-off-by: Jérôme Benoit --- diff --git a/tests/utils/AsyncLock.test.ts b/tests/utils/AsyncLock.test.ts index 162d357e..f0eda007 100644 --- a/tests/utils/AsyncLock.test.ts +++ b/tests/utils/AsyncLock.test.ts @@ -15,7 +15,7 @@ await describe('AsyncLock test suite', async () => { for (let i = 0; i < runs; i++) { AsyncLock.runExclusive(AsyncLockType.configuration, fn) .then(() => { - expect(executed).toEqual(new Array(count).fill(0).map((_, i) => ++i)) + expect(executed).toStrictEqual(new Array(count).fill(0).map((_, i) => ++i)) return undefined }) // eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable @@ -36,7 +36,7 @@ await describe('AsyncLock test suite', async () => { for (let i = 0; i < runs; i++) { AsyncLock.runExclusive(AsyncLockType.configuration, asyncFn) .then(() => { - expect(executed).toEqual(new Array(count).fill(0).map((_, i) => ++i)) + expect(executed).toStrictEqual(new Array(count).fill(0).map((_, i) => ++i)) return undefined }) // eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable