fix: tests badge name, more trying to get time tests working

This commit is contained in:
Jacobtread 2024-04-07 14:14:40 +12:00
parent 14126645af
commit 3957cd2620
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@
![License](https://img.shields.io/github/license/jacobtread/obsidian-timekeep?style=for-the-badge)
![Build](https://img.shields.io/github/actions/workflow/status/jacobtread/obsidian-timekeep/build.yml?style=for-the-badge)
![Tests](https://img.shields.io/github/actions/workflow/status/jacobtread/obsidian-timekeep/tests.yml?style=for-the-badge)
![Tests](https://img.shields.io/github/actions/workflow/status/jacobtread/obsidian-timekeep/tests.yml?style=for-the-badge&label=Tests)
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**

View file

@ -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", () => {