deemixer/tests/unit/utils/texts.spec.js

18 lines
539 B
JavaScript
Raw Normal View History

2021-06-02 15:51:56 +00:00
import { upperCaseFirstLowerCaseRest } from '../../../src/utils/texts'
describe('texts utils', () => {
describe('upperCaseFirstLowerCaseRest', () => {
it('converts a full uppercase string', () => {
expect(upperCaseFirstLowerCaseRest('TEST STRING')).toBe('Test string')
})
it('converts a full lowercase string', () => {
expect(upperCaseFirstLowerCaseRest('test string')).toBe('Test string')
})
it('converts a mixed string', () => {
expect(upperCaseFirstLowerCaseRest("i wOn'T woRK")).toBe("I won't work")
})
})
})