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
20 changes: 20 additions & 0 deletions src/isIsogram.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,24 @@ describe('isIsogram', () => {
it(`should be declared`, () => {
expect(isIsogram).toBeInstanceOf(Function);
});

it(`unique chars return true`, () => {
expect(isIsogram('playgrounds')).toBe(true);
});

it(`repetitive chars return false`, () => {
expect(isIsogram('look')).toBe(false);
});

it(`returns true for empty string`, () => {
expect(isIsogram('')).toBe(true);
});

it('returns false when the same letter appears in different cases', () => {
expect(isIsogram('Adam')).toBe(false);
});

it('returns false for mixed-case repeated letters', () => {
expect(isIsogram('Oops')).toBe(false);
});
});