chore: merge Tests for check flat case (#689)

* update function documentation and name to match js convention

* add additional documentation explaining what the function does

* add tests for checkFlatCase function

* fix standard.js errors
This commit is contained in:
Charlie Moore
2021-09-19 02:45:47 -04:00
committed by GitHub
parent 401ccd0200
commit e40c62ddd8
2 changed files with 26 additions and 6 deletions

View File

@ -0,0 +1,18 @@
import { checkFlatCase } from '../CheckFlatCase'
describe('checkFlatCase function', () => {
it('should return false when the input string is not in flatcase', () => {
const actual = checkFlatCase('this is not in flatcase')
expect(actual).toBe(false)
})
it('should return true when the input string is a single letter character', () => {
const actual = checkFlatCase('a')
expect(actual).toBe(true)
})
it('should return true when the input string is a string of lowercase letter characters with no spaces', () => {
const actual = checkFlatCase('abcdefghijklmnopqrstuvwxyz')
expect(actual).toBe(true)
})
})