-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We had an incorrect calculation in place for customs timestamps. Add a test for that and fix it.
- Loading branch information
Showing
3 changed files
with
20 additions
and
2 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,5 @@ | ||
--- | ||
bump: "patch" | ||
--- | ||
|
||
Bug fix in custom timestamp calculation |
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,12 @@ | ||
import { getAgentTimestamps } from "../utils" | ||
|
||
describe("Utils", () => { | ||
describe("getAgentTimestamps", () => { | ||
it("calculates the timeestamp", () => { | ||
const timestamp = getAgentTimestamps(1_589_192_966_108) | ||
|
||
expect(timestamp.sec).toEqual(1_589_192_966) | ||
expect(timestamp.nsec).toEqual(108000000) | ||
}) | ||
}) | ||
}) |
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