docs(import): put a contextless sensor reading in the downloadable example

The example CSV is the file people copy. It showed a glucose row with a
FASTING context and nothing else, which is the shape a meter produces, not
the shape a continuous sensor produces. It now carries both.

Refs #640
This commit is contained in:
Marc-André Bombeck committed 2026-07-25 21:56:10 +02:00
1 parent 4e95bd28f8
commit e43e758c8d
2 files changed
+16

No files matched your search

@@ -152,6 +152,18 @@ describe("EXAMPLE_CSV", () => {
expect(out.rows.length).toBeGreaterThan(0);
expect(out.rows.every((r) => r.status === "ok")).toBe(true);
});
it("carries a contextless glucose reading, the shape a sensor export has", () => {
const out = parseCsvMeasurements(EXAMPLE_CSV, {
now: new Date("2026-06-01T00:00:00Z").getTime(),
});
const glucose = out.rows
.map((r) => r.row)
.filter((row) => row?.type === "BLOOD_GLUCOSE");
expect(glucose.length).toBeGreaterThanOrEqual(2);
expect(glucose.some((row) => row?.glucoseContext === undefined)).toBe(true);
expect(glucose.some((row) => row?.glucoseContext === "FASTING")).toBe(true);
});
});
describe("parseImportJson guard", () => {