summaryrefslogtreecommitdiffhomepage
path: root/gui/test
diff options
context:
space:
mode:
authorHank <hank@mullvad.net>2022-10-05 14:35:27 +0200
committerHank <hank@mullvad.net>2022-10-05 16:01:55 +0200
commitedce617eeea18ce741b77a52b3ddcf78259859bb (patch)
tree30326353d3ab48dc61bf5a5f03cd8c17094eccc9 /gui/test
parent219e7f4658e73f8c4b4f49d55de278d9794900c0 (diff)
downloadmullvadvpn-edce617eeea18ce741b77a52b3ddcf78259859bb.tar.xz
mullvadvpn-edce617eeea18ce741b77a52b3ddcf78259859bb.zip
Update formatTimeLeft to also display "less than a day left"
Diffstat (limited to 'gui/test')
-rw-r--r--gui/test/unit/date-helper.spec.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/gui/test/unit/date-helper.spec.ts b/gui/test/unit/date-helper.spec.ts
index 5ed0cfa6da..5f44c53a2d 100644
--- a/gui/test/unit/date-helper.spec.ts
+++ b/gui/test/unit/date-helper.spec.ts
@@ -151,6 +151,7 @@ describe('Date helper', () => {
});
it('should format time left correctly', () => {
+ expect(date.formatTimeLeft('2022-09-01', '2022-09-01')).to.equal('less than a day left');
expect(date.formatTimeLeft('2022-09-01', '2022-09-02')).to.equal('1 day left');
expect(date.formatTimeLeft('2022-09-01', '2022-09-05')).to.equal('4 days left');
expect(date.formatTimeLeft('2022-09-01', '2022-09-30')).to.equal('29 days left');