Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

427 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { asTrimmedString } from '@/utils/stringUtils';

describe('stringUtils', () => {
  it('trims strings and returns undefined for empty values', () => {
    expect(asTrimmedString('  hello  ')).toBe('hello');
    expect(asTrimmedString('')).toBeUndefined();
    expect(asTrimmedString(undefined)).toBeUndefined();
    expect(asTrimmedString(null)).toBeUndefined();
  });
});