feat(md-print): add timestamp footer option

This commit is contained in:
2026-10-23 13:26:34 +08:00
parent 1ce76dca64
commit 8957e3d2f1
13 changed files with 126 additions and 23 deletions
+9
View File
@@ -12,6 +12,7 @@ describe("normalizePrintConfig", () => {
gap: "-5",
font: "20",
pageNumbers: "false",
timestamp: "true",
cutMarks: "no",
});
@@ -20,6 +21,7 @@ describe("normalizePrintConfig", () => {
expect(config.gap).toBe(0);
expect(config.font).toBe(6);
expect(config.pageNumbers).toBe(false);
expect(config.timestamp).toBe(true);
expect(config.cutMarks).toBe(false);
});
@@ -41,6 +43,7 @@ describe("normalizePrintConfig", () => {
font: 3,
title: "规则书",
pageNumbers: true,
timestamp: true,
cutMarks: false,
});
@@ -51,7 +54,13 @@ describe("normalizePrintConfig", () => {
font: 3,
title: "规则书",
pageNumbers: true,
timestamp: true,
cutMarks: false,
});
});
test("timestamp defaults to false", () => {
expect(normalizePrintConfig().timestamp).toBe(false);
expect(normalizePrintConfig({ timestamp: "false" }).timestamp).toBe(false);
});
});