diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index dfb16184..2586a4f1 100644 --- a/src/isIsogram.test.js +++ b/src/isIsogram.test.js @@ -1,9 +1,27 @@ -'use strict'; +"use strict"; -describe('isIsogram', () => { - const { isIsogram } = require('./isIsogram'); +describe("isIsogram", () => { + const { isIsogram } = require("./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 === "" ? "space" : key} ` + + "passed", + () => { + expect(isIsogram(key)).toBe(isIsogramMap[key]); + }, + ); + } });