Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ui-component-library / src / forms / deps / __tests__ / length.test.ts
Size: Mime:
/* eslint-disable max-statements */
import { isValidLength } from '../'

describe('validators.length', () => {
  it('allows values with valid length', () => {
    expect(isValidLength('Joe')).toBeTruthy()
    expect(isValidLength('123')).toBeTruthy()
  })

  it('does not allow undefined values', () => {
    expect(isValidLength(null)).toBeFalsy()
    expect(isValidLength(undefined)).toBeFalsy()
  })

  it('does not not allow empty values', () => {
    expect(isValidLength('')).toBeFalsy()

    // White space is allowed?
    // expect(isValidLength(' ')).toBeFalsy()
  })
})