-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hook up the frontend and add some helper funcs
- Loading branch information
1 parent
3debfda
commit 5e90d14
Showing
7 changed files
with
162 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright 2024 Marimo. All rights reserved. */ | ||
import { describe, it, expect } from "vitest"; | ||
import { formatChartTime } from "./tracing"; | ||
|
||
describe("formatUTCTime", () => { | ||
it("should format a timestamp correctly", () => { | ||
const timestamp = 1_700_000_000; // Example timestamp | ||
const formattedTime = formatChartTime(timestamp); | ||
expect(formattedTime).toBe("2023-11-15 06:13:20.000"); | ||
}); | ||
|
||
it("should return an empty string for invalid timestamp", () => { | ||
const invalidTimestamp = Number.NaN; | ||
const formattedTime = formatChartTime(invalidTimestamp); | ||
expect(formattedTime).toBe(""); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.