SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
import { omitBlank } from '../omitBlank';
describe('omitBlank', () => {
it.each([
['an empty string', ''],
['null', null],
['undefined', undefined],
['an empty array', []],
['an empty object', {}],
])('drops %s', (_label, blank) => {
expect(omitBlank({ kept: 'value', dropped: blank })).toStrictEqual({
kept: 'value',
});
});
it.each([
['false', false],
['zero', 0],
['an array with an entry', [1]],
['an object with a key', { a: 1 }],
])('keeps %s', (_label, value) => {
expect(omitBlank({ value })).toStrictEqual({ value });
});
});