test: improve min/max tests
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 3 Sep 2023 20:39:10 +0000 (22:39 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 3 Sep 2023 20:39:10 +0000 (22:39 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/utils.test.js

index 2101891a3982e575ecec3760a3d25b34e196f5e1..426985a299b366997189217802e4fab4283f7a7e 100644 (file)
@@ -315,12 +315,14 @@ describe('Utils test suite', () => {
   })
 
   it('Verify min() behavior', () => {
+    expect(min()).toBe(Infinity)
     expect(min(1, 2)).toBe(1)
     expect(min(2, 1)).toBe(1)
     expect(min(1, 1)).toBe(1)
   })
 
   it('Verify max() behavior', () => {
+    expect(max()).toBe(-Infinity)
     expect(max(1, 2)).toBe(2)
     expect(max(2, 1)).toBe(2)
     expect(max(1, 1)).toBe(1)