Files
JavaScript/String/test/CheckKebabCase.test.js
2024-02-29 10:25:11 +05:30

18 lines
477 B
JavaScript

import { CheckKebabCase } from '../CheckKebabCase'
test('CheckKebabCase(The-Algorithms) -> true', () => {
const word = 'The-Algorithms'
const res = CheckKebabCase(word)
expect(res).toBeTruthy()
})
test('CheckKebabCase(The Algorithms) -> false', () => {
const word = 'The Algorithms'
const res = CheckKebabCase(word)
expect(res).toBeFalsy()
})
test('CheckKebabCase throws when input is not a string', () => {
expect(() => CheckKebabCase(100)).toThrowError()
})