mirror of
https://github.com/jacobtread/obsidian-timekeep.git
synced 2026-07-22 10:10:27 +00:00
test: finialized test coverage for pdf definitions
This commit is contained in:
parent
aaa93c3371
commit
fbb361bc41
2 changed files with 20 additions and 4 deletions
|
|
@ -280,6 +280,26 @@ describe("createPdfDefinition", () => {
|
|||
expect(table.body.length).toBe(2);
|
||||
});
|
||||
|
||||
it("padding should be defined", () => {
|
||||
const timekeep: Timekeep = {
|
||||
entries: [],
|
||||
} as Timekeep;
|
||||
|
||||
const settings = createSettings();
|
||||
const now = moment();
|
||||
|
||||
const result = createPdfDefinition(timekeep, settings, now);
|
||||
|
||||
const table = (result.content as Content[])[1] as any;
|
||||
|
||||
expect(table.layout.paddingBottom).toBeDefined();
|
||||
expect(table.layout.paddingLeft).toBeDefined();
|
||||
expect(table.layout.paddingTop).toBeDefined();
|
||||
expect(table.layout.paddingRight).toBeDefined();
|
||||
expect(table.layout.paddingRight).toBeDefined();
|
||||
expect(table.layout.paddingRight()).toBe(8);
|
||||
});
|
||||
|
||||
it("renders links correctly inside the entry name", () => {
|
||||
const entry: TimeEntry = {
|
||||
id: "1",
|
||||
|
|
|
|||
|
|
@ -342,10 +342,6 @@ function createTableEntryCells(
|
|||
|
||||
const marginLeft = depth * 5;
|
||||
|
||||
if (depth > 0) {
|
||||
const _bg = "#999";
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
text: createTableEntryName(entry.name),
|
||||
|
|
|
|||
Loading…
Reference in a new issue