From cbe619bd61250459500494135a14057d24cbb4fe Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 22 Jun 2025 20:29:16 -0500 Subject: [PATCH] feat(parser): increase telemetry test coverage to 100% --- test/parser/telemetry_test.exs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/parser/telemetry_test.exs b/test/parser/telemetry_test.exs index e4f4d20..b1c9945 100644 --- a/test/parser/telemetry_test.exs +++ b/test/parser/telemetry_test.exs @@ -54,6 +54,22 @@ defmodule Parser.TelemetryTest do assert result[:project_names] == ["foo", "bar"] end + test "parses empty :BITS. string" do + result = Telemetry.parse(":BITS.") + + assert result == %{ + data_type: :telemetry_bits, + bits_sense: [], + project_names: [], + raw_data: "" + } + end + + test "parses T# telemetry string with only sequence number" do + result = Telemetry.parse("T#123") + assert result == %{raw_data: "123", data_type: :telemetry} + end + test "parses :BITS. with no project names" do result = Telemetry.parse(":BITS.101010") assert result[:data_type] == :telemetry_bits