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
23 changes: 22 additions & 1 deletion src/isIsogram.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
/* eslint-disable */
'use strict';

describe('isIsogram', () => {
const { isIsogram } = require('./isIsogram');

it(`should be declared`, () => {
it('should be declared', () => {
expect(isIsogram).toBeInstanceOf(Function);
});

it('returns true for a valid isogram', () => {
expect(isIsogram('playgrounds')).toBe(true);
});

it('returns false for a word with a repeated letter', () => {
expect(isIsogram('look')).toBe(false);
});

it('returns false for a word with repeated letters in different cases', () => {
expect(isIsogram('Adam')).toBe(false);
});

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

it('returns false for a mixed-case word with duplicate letters', () => {
expect(isIsogram('Oops')).toBe(false);
});
});
Loading