feat(md-print): add timestamp footer option
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user