fleet/frontend/utilities/date_format/date_format.tests.ts
Gabriel Hernandez a292e704de
add startup assistant to the UI (#17731)
relates to #9147

add the setup assistant page to the UI. This includes:

- new setup assistant page
- uploaded profile and release device manually form
- preview for setup assistant flow

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2024-03-26 14:46:33 +00:00

13 lines
413 B
TypeScript

import { uploadedFromNow } from ".";
describe("date_format", () => {
describe("uploadedFromNow util", () => {
it("returns an user friendly uploaded at message", () => {
const currentDate = new Date();
currentDate.setDate(currentDate.getDate() - 2);
const twoDaysAgo = currentDate.toISOString();
expect(uploadedFromNow(twoDaysAgo)).toEqual("Uploaded 2 days ago");
});
});
});