From fa27c3479ffc4edcadd5ec4889ec10dee723f26f Mon Sep 17 00:00:00 2001 From: Dmytro Nikulin Date: Fri, 27 Feb 2026 11:24:13 +0200 Subject: [PATCH 1/3] Add solution --- src/isIsogram.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index dfb16184..d4b2535f 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -6,4 +6,24 @@ describe('isIsogram', () => { it(`should be declared`, () => { expect(isIsogram).toBeInstanceOf(Function); }); + + it(`should return true for empty string`, () => { + expect(isIsogram('')).toBe(true); + }); + + it(`should return true + if all the letters in the string are different`, () => { + expect(isIsogram('polygraphic')).toBe(true); + }); + + it(`should return false + if any of the letters in the string repeat`, () => { + expect(isIsogram('whoops')).toBe(false); + }); + + it(`should return false + if any of the letters in the string repeat + while ignoring the letter case`, () => { + expect(isIsogram('Analogy')).toBe(false); + }); }); From ea9a06fbc491babe215fad00b34e3a92e917c587 Mon Sep 17 00:00:00 2001 From: Dmytro Nikulin Date: Fri, 27 Feb 2026 11:24:47 +0200 Subject: [PATCH 2/3] Add solution --- src/isIsogram.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index d4b2535f..20ca2724 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -13,7 +13,7 @@ describe('isIsogram', () => { it(`should return true if all the letters in the string are different`, () => { - expect(isIsogram('polygraphic')).toBe(true); + expect(isIsogram('playground')).toBe(true); }); it(`should return false From 4315a6fdda0466bc847573506be38d67b6f06322 Mon Sep 17 00:00:00 2001 From: Dmytro Nikulin Date: Fri, 27 Feb 2026 11:28:12 +0200 Subject: [PATCH 3/3] Changed test conditions --- src/isIsogram.test.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index 20ca2724..5b4a7672 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -13,17 +13,23 @@ describe('isIsogram', () => { it(`should return true if all the letters in the string are different`, () => { - expect(isIsogram('playground')).toBe(true); + expect(isIsogram('playgrounds')).toBe(true); }); it(`should return false if any of the letters in the string repeat`, () => { - expect(isIsogram('whoops')).toBe(false); + expect(isIsogram('look')).toBe(false); }); it(`should return false if any of the letters in the string repeat while ignoring the letter case`, () => { - expect(isIsogram('Analogy')).toBe(false); + expect(isIsogram('Adam')).toBe(false); + }); + + it(`should return false + if any of the letters in the string repeat + while ignoring the letter case and their positions`, () => { + expect(isIsogram('Oops')).toBe(false); }); });