diff --git a/src/isIsogram.test.js b/src/isIsogram.test.js index dfb16184..5b4a7672 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 empty string`, () => { + expect(isIsogram('')).toBe(true); + }); + + it(`should return true + if all the letters in the string are different`, () => { + expect(isIsogram('playgrounds')).toBe(true); + }); + + it(`should return false + if any of the letters in the string repeat`, () => { + 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('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); + }); });