diff --git a/tests/test.js b/tests/test.js index 04c99a7..8703238 100644 --- a/tests/test.js +++ b/tests/test.js @@ -156,6 +156,15 @@ test("non-string input", () => { assert.equal(pc.red(Infinity), FMT.red[0] + "Infinity" + FMT.red[1]) }) +test("shouldn't overflow when coloring already colored large text", () => { + try { + pc.blue(pc.red("x").repeat(10000)) + assert(true) + } catch { + assert(false) + } +}) + function test(name, fn) { try { fn()