Skip to content

Commit 89bba20

Browse files
committed
add jasmine tests
1 parent 9d848c8 commit 89bba20

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/jasmine/tests/lib_date_test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,20 @@ describe('dates', function() {
368368
expect(Lib.dateTime2ms(v, 'chinese')).toBeUndefined(v);
369369
});
370370
});
371+
372+
fit('Persian calendar should give the right values', function() {
373+
[
374+
'1403-12-29',
375+
'1403-12-30',
376+
'1404-01-01',
377+
'1404-01-02'
378+
].forEach(function(v) {
379+
var calendar = 'persian';
380+
var dateStr = v;
381+
expect(Lib.ms2DateTime(0, 0, calendar)).toBe(dateStr, calendar);
382+
expect(Lib.dateTime2ms(dateStr, calendar)).toBe(0, calendar);
383+
});
384+
});
371385
});
372386

373387
describe('cleanDate', function() {

0 commit comments

Comments
 (0)