Skip to content

Commit

Permalink
Create jalaliToGregorian.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaFarhadian committed Jan 10, 2014
1 parent 73d02d8 commit 243dc97
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions jalaliToGregorian.spec.js
@@ -0,0 +1,20 @@
// Jalali To Gregorian Test Unit

var jalali = require('../index');

describe('Jalali to Gregorian', function () {
it('should be correct date', function () {
var gregorianDate = {
y: 2014,
m: 01,
d: 08
};
var jalaliDate = { // Correct Date
y: 1392,
m: 10,
d: 18
};

expect(jalali.convert(jalaliDate.y, jalaliDate.m, jalaliDate.d, 'jg')).toEqual(gregorianDate);
});
});

0 comments on commit 243dc97

Please sign in to comment.