mirror of
https://gitlab.com/RemixDev/deemix-webui.git
synced 2024-12-29 10:56:05 +00:00
17 lines
469 B
JavaScript
17 lines
469 B
JavaScript
import { checkNewRelease } from '../../../src/utils/dates.js'
|
|
|
|
describe('date utils', () => {
|
|
describe('checkNewRelease', () => {
|
|
it("returns a positive result checking today's date", () => {
|
|
expect(checkNewRelease(new Date())).toBe(true)
|
|
})
|
|
|
|
it("returns a negative result checking a week ago's date", () => {
|
|
const dateToCheck = new Date()
|
|
dateToCheck.setDate(dateToCheck.getDate() - 7)
|
|
|
|
expect(checkNewRelease(dateToCheck)).toBe(false)
|
|
})
|
|
})
|
|
})
|