mirror of
https://github.com/jacobtread/obsidian-timekeep.git
synced 2026-07-22 10:10:27 +00:00
fix: tests badge name, more trying to get time tests working
This commit is contained in:
parent
14126645af
commit
3957cd2620
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
This plugin provides a way to simply and easily track time spent on various tasks. After tracking your time you can export the tracked time as a **Markdown Table**, **CSV**, **JSON**, or **PDF**
|
||||
|
|
|
|||
|
|
@ -33,15 +33,15 @@ it("should format editable time", () => {
|
|||
});
|
||||
|
||||
it("should unformat editable time", () => {
|
||||
const input = "2024-03-31 15:34:45";
|
||||
const expected = moment("2024-03-31T02:34:45.000Z").utc();
|
||||
const input = "2024-03-31 02:34:45";
|
||||
const expected = moment.utc("2024-03-31T02:34:45.000Z");
|
||||
|
||||
const settings: TimekeepSettings = defaultSettings;
|
||||
settings.editableTimestampFormat = "YYYY-MM-DD HH:mm:ss";
|
||||
|
||||
const output = unformatEditableTimestamp(input, settings).utc();
|
||||
|
||||
expect(output.toISOString()).toBe(expected.toISOString());
|
||||
expect(output.toDate()).toStrictEqual(expected.toDate());
|
||||
});
|
||||
|
||||
describe("format duration", () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue