Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/isIsogram.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,20 @@ describe('isIsogram', () => {
it(`should be declared`, () => {
expect(isIsogram).toBeInstanceOf(Function);
});

it('should return true for a word without repeating letters', () => {
expect(isIsogram('playgrounds')).toBe(true);
});

it('should return true for an empty string', () => {
expect(isIsogram('')).toBe(true);
});

it('should return false for a word with repeating letters', () => {
expect(isIsogram('look')).toBe(false);
});

it('should return false for repeating letters in different cases', () => {
expect(isIsogram('Adam')).toBe(false);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test case: the task description explicitly shows isIsogram('Oops') === false as an example that should be tested. This verifies the function detects repeating letters like the double 'o' in 'Oops'.

});
Loading