import { isEmpty } from '../utils/isEmpty'

describe('DC Validator - isEmpty', () => {
  it('should return true for null', () => {
    expect(isEmpty(null)).toBe(true)
  })

  it('should return true for undefined', () => {
    expect(isEmpty(undefined)).toBe(true)
  })

  it('should return true for empty string', () => {
    expect(isEmpty('')).toBe(true)
  })

  it('should return true for whitespace-only string', () => {
    expect(isEmpty('   ')).toBe(true)
    expect(isEmpty('\t\n')).toBe(true)
  })

  it('should return false for non-empty string', () => {
    expect(isEmpty('hello')).toBe(false)
    expect(isEmpty(' hello ')).toBe(false)
  })

  it('should return false for number zero', () => {
    expect(isEmpty(0)).toBe(false)
  })

  it('should return false for non-zero numbers', () => {
    expect(isEmpty(42)).toBe(false)
    expect(isEmpty(-1)).toBe(false)
  })

  it('should return false for boolean values', () => {
    expect(isEmpty(true)).toBe(false)
    expect(isEmpty(false)).toBe(false)
  })
})
