diff --git a/packages/otelbin/src/components/monaco-editor/otelCollectorConfigValidation.test.ts b/packages/otelbin/src/components/monaco-editor/otelCollectorConfigValidation.test.ts index 83d2cb02..dd0e85ea 100644 --- a/packages/otelbin/src/components/monaco-editor/otelCollectorConfigValidation.test.ts +++ b/packages/otelbin/src/components/monaco-editor/otelCollectorConfigValidation.test.ts @@ -228,4 +228,12 @@ describe("findErrorElement", () => { expect(result).toEqual(expectedOutput); }); + + it("with both empty parsed yaml doc and empty error path should return undefined", () => { + const result = findErrorElement([], []); + + const expectedOutput = undefined; + + expect(result).toEqual(expectedOutput); + }); });