mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 14:35:45 +00:00
fix(environment): reject invalid dates in write inference (#12188)
This commit is contained in:
1 parent
8ab42177c7
commit
b2c508eaa7
2 files changed
+16
-3
No files matched your search
@@ -1354,3 +1354,17 @@ it("trims a created clock's fraction, and its sibling clock's, when held entitie
|
||||
format: trimmed,
|
||||
});
|
||||
});
|
||||
|
||||
it.each([
|
||||
["2024-02-29", "2024-02-29T00:00:00Z", false],
|
||||
["2024-02-30", "2024-03-01T00:00:00Z", true],
|
||||
["2023-02-29", "2023-03-01T00:00:00Z", true],
|
||||
])(
|
||||
"only pins the date-only member %s when it denotes a real date",
|
||||
(dateEnd, dateEndUtc, editable) => {
|
||||
const { body } = explainCreate(
|
||||
created({ id: "42", dateEnd, dateEndUtc }, { dateEnd }),
|
||||
);
|
||||
expect(body.accepted.includes("dateEnd")).toBe(editable);
|
||||
},
|
||||
);
|
||||
Reference in new issue
Block a user