From 5805d6708c9e357ce7b24eb6b518ad97fd47dac9 Mon Sep 17 00:00:00 2001 From: Alyona Shunevych Date: Mon, 4 May 2026 21:29:54 +0300 Subject: [PATCH] Solution --- src/isIsogram.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index dfb16184..c6fba4e6 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -6,4 +6,30 @@ describe('isIsogram', () => { it(`should be declared`, () => { expect(isIsogram).toBeInstanceOf(Function); }); + + it(`should return 'true' for an empty string`, () => { + const result = isIsogram(''); + + expect(result).toBeTruthy(); + }); + + it(`should return 'true' for a word that has no repeated letters`, () => { + const result = isIsogram('playgrounds'); + + expect(result).toBeTruthy(); + }); + + it(`should return 'false' for a word that has repeated letters`, () => { + const result = isIsogram('look'); + + expect(result).toBeFalsy(); + }); + + it('should be case-insensitive', () => { + const result1 = isIsogram('Adam'); + const result2 = isIsogram('Oops'); + + expect(result1).toBeFalsy(); + expect(result2).toBeFalsy(); + }); });