Skip to content

Commit

Permalink
test: adjust date format per platform
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniiriarios committed Apr 25, 2024
1 parent 445ec48 commit 4bd3de2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
14 changes: 10 additions & 4 deletions test/specs/add.book.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ const data1: Record<string, string> = {
descriptionText: "This is not a book.",
};

const dates1: Record<string, string> = {
published: "1987\t0615", // in form of keys to type
read: "2024\t0425",
};
const dates1: Record<string, string> =
process.platform === "win32"
? {
published: "1987\t0615", // in form of keys to type
read: "2024\t0425",
}
: {
published: "06151987",
read: "04252024",
};

const tags1 = ["Some", "Tags"];

Expand Down
30 changes: 21 additions & 9 deletions test/specs/edit.book.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,27 @@ const data2: Record<string, string> = {
notesText: "メモ",
};

const dates1: Record<string, string> = {
published: "2001\t0101", // in form of keys to type
read: "2023\t0423",
};

const dates2: Record<string, string> = {
published: "2002\t0602",
read: "2024\t0124",
};
const dates1: Record<string, string> =
process.platform === "win32"
? {
published: "2001\t0101", // in form of keys to type
read: "2023\t0423",
}
: {
published: "01012001",
read: "04232023",
};

const dates2: Record<string, string> =
process.platform === "win32"
? {
published: "2002\t0602",
read: "2024\t0124",
}
: {
published: "06022002",
read: "01242024",
};

const tags1 = ["Non-Fiction", "Art"];
const tags2 = ["フィクション", "芸術"];
Expand Down

0 comments on commit 4bd3de2

Please sign in to comment.