Skip to content

Commit

Permalink
[test] Avoid hours around DST
Browse files Browse the repository at this point in the history
  • Loading branch information
ichernev committed Mar 27, 2022
1 parent e968092 commit 7a10de8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/test/locale/gu.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,36 +313,36 @@ test('fromNow', function (assert) {
});

test('calendar day', function (assert) {
var a = moment().hours(2).minutes(0).seconds(0);
var a = moment().hours(12).minutes(0).seconds(0);

assert.equal(
moment(a).calendar(),
'આજ રાત ૨:૦૦ વાગ્યે',
'આજ બપોર ૧૨:૦૦ વાગ્યે',
'today at the same time'
);
assert.equal(
moment(a).add({ m: 25 }).calendar(),
'આજ રાત ૨:૨૫ વાગ્યે',
'આજ બપોર ૧૨:૨૫ વાગ્યે',
'Now plus 25 min'
);
assert.equal(
moment(a).add({ h: 3 }).calendar(),
'આજ સવાર ૫:૦૦ વાગ્યે',
'આજ બપોર ૩:૦૦ વાગ્યે',
'Now plus 3 hour'
);
assert.equal(
moment(a).add({ d: 1 }).calendar(),
'કાલે રાત ૨:૦૦ વાગ્યે',
'કાલે બપોર ૧૨:૦૦ વાગ્યે',
'tomorrow at the same time'
);
assert.equal(
moment(a).subtract({ h: 1 }).calendar(),
'આજ રાત ૧:૦૦ વાગ્યે',
'આજ બપોર ૧૧:૦૦ વાગ્યે',
'Now minus 1 hour'
);
assert.equal(
moment(a).subtract({ d: 1 }).calendar(),
'ગઇકાલે રાત ૨:૦૦ વાગ્યે',
'ગઇકાલે બપોર ૧૨:૦૦ વાગ્યે',
'yesterday at the same time'
);
});
Expand Down
14 changes: 7 additions & 7 deletions src/test/locale/x-pseudo.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,36 +312,36 @@ test('fromNow', function (assert) {
});

test('calendar day', function (assert) {
var a = moment().hours(2).minutes(0).seconds(0);
var a = moment().hours(12).minutes(0).seconds(0);

assert.equal(
moment(a).calendar(),
'T~ódá~ý át 02:00',
'T~ódá~ý át 12:00',
'today at the same time'
);
assert.equal(
moment(a).add({ m: 25 }).calendar(),
'T~ódá~ý át 02:25',
'T~ódá~ý át 12:25',
'Now plus 25 min'
);
assert.equal(
moment(a).add({ h: 1 }).calendar(),
'T~ódá~ý át 03:00',
'T~ódá~ý át 13:00',
'Now plus 1 hour'
);
assert.equal(
moment(a).add({ d: 1 }).calendar(),
'T~ómó~rró~w át 02:00',
'T~ómó~rró~w át 12:00',
'tomorrow at the same time'
);
assert.equal(
moment(a).subtract({ h: 1 }).calendar(),
'T~ódá~ý át 01:00',
'T~ódá~ý át 11:00',
'Now minus 1 hour'
);
assert.equal(
moment(a).subtract({ d: 1 }).calendar(),
'Ý~ést~érdá~ý át 02:00',
'Ý~ést~érdá~ý át 12:00',
'yesterday at the same time'
);
});
Expand Down

0 comments on commit 7a10de8

Please sign in to comment.