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
test: traceGraphFilter/utils selectedGroupByValue is added (#2201)
palashgdev1151e8521e03
diff --git a/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts b/frontend/src/container/Trace/TraceGraphFilter/utils.test.tsnew file mode 100644index 0000000000..24787194b3--- /dev/null+++ b/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts@@ -0,0 +1,27 @@+import { selectedGroupByValue } from './utils';++const options = [+ {+ value: '1',+ label: '1',+ },+ {+ value: '2',+ label: '2',+ },+];++describe('TraceGraphFilter/utils', () => {+ it('should return the correct value', () => {+ const selectedGroupBy = '1';+ const result = selectedGroupByValue(selectedGroupBy, options);+ expect(result).toEqual(selectedGroupBy);+ });++ it('should return the correct value when selectedOption not found', () => {+ const selectedGroupBy = '3';++ const result = selectedGroupByValue(selectedGroupBy, options);+ expect(result).toEqual(selectedGroupBy);+ });+});