refactor: refine circular buffer error message
[poolifier.git] / tests / circular-buffer.test.mjs
index 2d275237413c9f91741cf3f09170a40e9446c1bd..f6afdda9cd63999aacc817ec1878d7dd3b7dde94 100644 (file)
@@ -24,16 +24,16 @@ describe('Circular buffer test suite', t => {
 
   it('Verify that circular buffer size is valid at instance creation', () => {
     expect(() => new CircularBuffer(0.25)).toThrow(
-      new TypeError('Invalid circular buffer size: 0.25 is not an integer')
+      new TypeError("Invalid circular buffer size: '0.25' is not an integer")
     )
     expect(() => new CircularBuffer(-1)).toThrow(
       new RangeError('Invalid circular buffer size: -1 < 0')
     )
     expect(() => new CircularBuffer(Number.MAX_SAFE_INTEGER + 1)).toThrow(
       new TypeError(
-        `Invalid circular buffer size: ${
+        `Invalid circular buffer size: '${
           Number.MAX_SAFE_INTEGER + 1
-        } is not an integer`
+        }' is not an integer`
       )
     )
   })