155 files
This commit is contained in:
1 parent
a212615470
commit
0ff8c287a8
155 files changed
+19264
-3148
No files matched your search
+3
-5
@@ -22,8 +22,8 @@ import {
|
||||
MAX_OCCURRENCES_PER_TASK,
|
||||
} from "../helpers/calendar-bucket";
|
||||
|
||||
const TODAY = new Date(2026, 4, 1); // 2026-05-01 local
|
||||
const TODAY_ISO = "2026-05-01";
|
||||
const TODAY = "2026-05-01"; // HA's today, as haToday() gives it
|
||||
const TODAY_ISO = TODAY;
|
||||
|
||||
function addDays(iso: string, days: number): string {
|
||||
const [y, m, d] = iso.split("-").map(Number);
|
||||
@@ -341,10 +341,8 @@ describe("buildCalendarBuckets", () => {
|
||||
// ── v2.2.0 — past-window bucketer ────────────────────────────────────────
|
||||
|
||||
function histEntry(daysAgo: number, type = "completed", over: Partial<any> = {}) {
|
||||
const d = new Date(TODAY);
|
||||
d.setDate(d.getDate() - daysAgo);
|
||||
return {
|
||||
timestamp: `${isoDateLocal(d)}T08:30:00`,
|
||||
timestamp: `${addDays(TODAY_ISO, -daysAgo)}T08:30:00`,
|
||||
type,
|
||||
...over,
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { expect } from "@open-wc/testing";
|
||||
import { warrantyStatus, WARRANTY_WARN_DAYS } from "../helpers/warranty";
|
||||
|
||||
const TODAY = new Date(2026, 5, 1); // 2026-06-01 local
|
||||
const TODAY = "2026-06-01"; // HA's today, as haToday() gives it
|
||||
|
||||
describe("warrantyStatus (#67)", () => {
|
||||
it("null / undefined / empty / invalid → none", () => {
|
||||
|
||||
Reference in new issue
Block a user