test: refine AsyncLock runExclusive() expectation
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 4 Aug 2024 18:47:59 +0000 (20:47 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 4 Aug 2024 18:47:59 +0000 (20:47 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/utils/AsyncLock.test.ts

index 162d357e28a05047a4cb036526f76a029214f3fd..f0eda00752d05f23d237633901f734693c9d6ef1 100644 (file)
@@ -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