feat(parser): increase telemetry test coverage to 100%

This commit is contained in:
Graham McIntire 2025-06-22 20:29:16 -05:00
parent 831d374419
commit cbe619bd61
No known key found for this signature in database

View file

@ -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