-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3299 from threefoldtech/development_new_apps
Add new key word for new apps
- Loading branch information
Showing
5 changed files
with
132 additions
and
5 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
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
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
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
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,23 @@ | ||
import { describe, expect, it } from "vitest"; | ||
|
||
import { isReleasedOverMon } from "../../src/utils/date"; | ||
|
||
describe("isReleasedOverMon", () => { | ||
it("return true if the releaseDate is within 30 days", () => { | ||
const releaseDate = new Date("2024-09-1"); | ||
const currentDate = new Date("2024-09-19"); | ||
expect(isReleasedOverMon(releaseDate, currentDate)).toBe(true); | ||
}); | ||
|
||
it("return false if the releaseDate was from more than 30 days", () => { | ||
const releaseDate = new Date("2024-09-1"); | ||
const currentDate = new Date("2024-11-19"); | ||
expect(isReleasedOverMon(releaseDate, currentDate)).toBe(false); | ||
}); | ||
|
||
it("return true if releaseDate is today", () => { | ||
const releaseDate = new Date("2024-09-19"); | ||
const currentDate = new Date("2024-09-19"); | ||
expect(isReleasedOverMon(releaseDate, currentDate)).toBe(true); | ||
}); | ||
}); |