mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
Merge branch 'release/v1.46.0' into feat/v146-ui
This commit is contained in:
commit
551fbbbdec
445 files changed
+164623
-24087
No files matched your search
@@ -21,7 +21,11 @@ import { join } from "node:path";
|
||||
|
||||
const ROOT = join(__dirname, "../../..");
|
||||
const INSIGHTS_PATH = join(ROOT, "src/app/insights/page-client.tsx");
|
||||
const ANALYTICS_ROUTE_PATH = join(ROOT, "src/app/api/analytics/route.ts");
|
||||
/** The analytics default body, built outside its route. */
|
||||
const ANALYTICS_BODY_PATHS = [
|
||||
join(ROOT, "src/lib/analytics/response/default-body.ts"),
|
||||
join(ROOT, "src/lib/analytics/response/correlations.ts"),
|
||||
];
|
||||
const ADVISOR_HOOK_PATH = join(
|
||||
ROOT,
|
||||
"src/components/insights/use-insights-advisor.ts",
|
||||
@@ -84,7 +88,7 @@ describe("v1.4.20 B3 — /api/analytics surfaces correlations", () => {
|
||||
});
|
||||
|
||||
it("returns a `correlations` block on the success payload", () => {
|
||||
const src = load(ANALYTICS_ROUTE_PATH);
|
||||
const src = ANALYTICS_BODY_PATHS.map(load).join("\n");
|
||||
expect(src).toMatch(/correlations:\s*correlationsWithPatterns,/);
|
||||
expect(src).toMatch(/computeCorrelationHypotheses/);
|
||||
});
|
||||
|
||||
@@ -238,8 +238,9 @@ describe("v1.4.22 W5 reconcile (Code-H2) — BD-Zielbereich tile compareDelta us
|
||||
});
|
||||
|
||||
it("ships priorMonth + priorYear pcts in the analytics envelope", () => {
|
||||
// The default body is built outside the route.
|
||||
const ROUTE_SRC = readFileSync(
|
||||
join(ROOT, "src/app/api/analytics/route.ts"),
|
||||
join(ROOT, "src/lib/analytics/response/default-body.ts"),
|
||||
"utf8",
|
||||
);
|
||||
expect(ROUTE_SRC).toContain("bpInTargetPctPriorMonth");
|
||||
|
||||
Reference in new issue
Block a user