mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
18 lines
477 B
JavaScript
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()
|
|
})
|