Skip to content

Commit

Permalink
remove obsolete tests, for new add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Dec 30, 2015
1 parent b82e115 commit 0daf96d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 43 deletions.
1 change: 1 addition & 0 deletions lib/day.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function defaultDayRenderer (props, options, css) {
}
}

// TODO: move it to props
function createClassNames (props, options) {
let classNames = DayModel.getClassNameParts(props, options);
if (props.UI_DAY_CLASSNAME) {
Expand Down
44 changes: 1 addition & 43 deletions specs/day.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,56 +119,14 @@ describe('Day', function () {

expect(DayProps.getClassNameParts({
DAY: moment(),
DATE_SELECTS: {},
CLASSNAME: 'c'
}, {})).toEqual(['day']);

expect(DayProps.getClassNameParts({
DAY: moment('', 'YYYY-MM-DD'),
DATE_SELECTS: {},
CLASSNAME: 'c'
}, {})).toEqual(['day']);
});

it('getClassName, selects', function () {
expect(DayProps.getClassNameParts({
DAY: moment('2015-03-30', 'YYYY-MM-DD'),
DATE_SELECTS: {
'2015-03-30': 'day-select'
},
CLASSNAME: 'c'
}, {})).toEqual(['day', 'day-select']);

expect(DayProps.getClassNameParts({
DAY: moment('2015-03-30', 'YYYY-MM-DD'),
DATE_SELECTS: {
'2015-03-01': 'day-select'
},
CLASSNAME: 'c'
}, {})).toEqual(['day']);
});

it('getClassName, ranges', function () {
expect(DayProps.getClassNameParts({
DAY: moment('2015-03-20', 'YYYY-MM-DD'),
DATE_SELECTS: {},
DATE_RANGES: [{
FROM: new Date('2015-03-10'),
TO: new Date('2015-03-30'),
CLASSNAME: 'day-range'
}],
CLASSNAME: 'c'
}, {})).toEqual(['day', 'day-range']);

expect(DayProps.getClassNameParts({
DAY: moment('2015-03-30', 'YYYY-MM-DD'),
DATE_SELECTS: {},
DATE_RANGES: [{
FROM: new Date('2015-03-10'),
TO: new Date('2015-03-20'),
CLASSNAME: 'day-range'
}],
CLASSNAME: 'c'
}, {})).toEqual(['day']);
});
// TODO: tests for UI_DAY_CLASSNAME
});

0 comments on commit 0daf96d

Please sign in to comment.