mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-03 17:10:06 +08:00
27 lines
557 B
JavaScript
27 lines
557 B
JavaScript
|
|
beforeEach(function() {
|
|
jasmine.addMatchers({
|
|
toEqualMoment: function() {
|
|
return {
|
|
compare: function(actual, expected) {
|
|
return {
|
|
pass: $.fullCalendar.moment.parseZone(actual).format() ===
|
|
$.fullCalendar.moment.parseZone(expected).format()
|
|
};
|
|
}
|
|
};
|
|
},
|
|
toEqualNow: function() {
|
|
return {
|
|
compare: function(actual) {
|
|
return {
|
|
pass: Math.abs(
|
|
$.fullCalendar.moment.parseZone(actual) -
|
|
new Date()
|
|
) < 1000 // within a second of current datetime
|
|
};
|
|
}
|
|
};
|
|
}
|
|
});
|
|
}); |