test: improve deque coverage
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 26 Aug 2023 20:43:44 +0000 (22:43 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 26 Aug 2023 20:43:44 +0000 (22:43 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/deque.test.js

index 386b8ae1290c67e65b8191403f06d9bb21b666a0..290eadbfa48df38c0488faf732377aae8b0dd888 100644 (file)
@@ -101,7 +101,9 @@ describe('Deque test suite', () => {
     deque.push(1)
     deque.push(2)
     deque.push(3)
+    expect(deque.size).toBe(3)
     expect(deque.peekFirst()).toBe(1)
+    expect(deque.size).toBe(3)
   })
 
   it('Verify peekLast() behavior', () => {
@@ -109,7 +111,9 @@ describe('Deque test suite', () => {
     deque.push(1)
     deque.push(2)
     deque.push(3)
+    expect(deque.size).toBe(3)
     expect(deque.peekLast()).toBe(3)
+    expect(deque.size).toBe(3)
   })
 
   it('Verify clear() behavior', () => {