From 2ada4138c4bc2448e73a39e78cc52e2bd2d31c1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 3 Jun 2023 11:22:58 +0200 Subject: [PATCH] test: improve queue test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/queue.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/queue.test.js b/tests/queue.test.js index 93211106..6451b732 100644 --- a/tests/queue.test.js +++ b/tests/queue.test.js @@ -9,18 +9,21 @@ describe('Queue test suite', () => { expect(rtSize).toBe(queue.size) expect(queue.head).toBe(0) expect(queue.tail).toBe(1) + expect(queue.max).toBe(1) expect(queue.items).toStrictEqual({ 0: 1 }) rtSize = queue.enqueue(2) expect(queue.size).toBe(2) expect(rtSize).toBe(queue.size) expect(queue.head).toBe(0) expect(queue.tail).toBe(2) + expect(queue.max).toBe(2) expect(queue.items).toStrictEqual({ 0: 1, 1: 2 }) rtSize = queue.enqueue(3) expect(queue.size).toBe(3) expect(rtSize).toBe(queue.size) expect(queue.head).toBe(0) expect(queue.tail).toBe(3) + expect(queue.max).toBe(3) expect(queue.items).toStrictEqual({ 0: 1, 1: 2, 2: 3 }) }) -- 2.34.1