This commit is contained in:
tmshv committed 2016-11-11 02:36:03 +03:00
1 parent be398bf5ce
commit f121eff445
38 files changed
+498 -267

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import {getPeriod} from '../../src/models/schedule';
describe('models', () => {
describe('schedule.js', () => {
describe('getPeriod', () => {
it('should accept a string and return an array', () => {
getPeriod('2016-2017').should.be.Array;
});
it('should accept a string "XXXX-YYYY" and return an array [XXXX, YYYY]', () => {
const sample = '2016-2017';
const result = getPeriod(sample);
result.should.be.eql([2016, 2017]);
});
});
});
});