From d9102185a4e4bd3f0ea38b583f4f5d9eaee5a998 Mon Sep 17 00:00:00 2001 From: Radymyr Date: Wed, 28 Jan 2026 16:19:46 +0200 Subject: [PATCH 1/2] solution --- src/isIsogram.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index dfb16184..b32636f4 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -6,4 +6,18 @@ describe('isIsogram', () => { it(`should be declared`, () => { expect(isIsogram).toBeInstanceOf(Function); }); + + const isIsogramMap = { + playgrounds: true, + look: false, + Adam: false, + '': true, + Oops: false, + }; + + for (const key in isIsogramMap) { + it(`should ${isIsogramMap[key]} if ${key} passed`, () => { + expect(isIsogram(key)).toBe(isIsogramMap[key]); + }); + } }); From a67a41be4efb95a49b244e925f0938d679bd2610 Mon Sep 17 00:00:00 2001 From: Radymyr Date: Wed, 28 Jan 2026 16:26:11 +0200 Subject: [PATCH 2/2] fix: fixed arguments naming --- src/isIsogram.test.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index b32636f4..2586a4f1 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; -describe('isIsogram', () => { - const { isIsogram } = require('./isIsogram'); +describe("isIsogram", () => { + const { isIsogram } = require("./isIsogram"); it(`should be declared`, () => { expect(isIsogram).toBeInstanceOf(Function); @@ -11,13 +11,17 @@ describe('isIsogram', () => { playgrounds: true, look: false, Adam: false, - '': true, + "": true, Oops: false, }; for (const key in isIsogramMap) { - it(`should ${isIsogramMap[key]} if ${key} passed`, () => { - expect(isIsogram(key)).toBe(isIsogramMap[key]); - }); + it( + `should ${isIsogramMap[key]} if ${key === "" ? "space" : key} ` + + "passed", + () => { + expect(isIsogram(key)).toBe(isIsogramMap[key]); + }, + ); } });