deemix-webui/tests/unit/utils/texts.spec.js
2021-06-02 17:51:56 +02:00

18 lines
539 B
JavaScript

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")
})
})
})