mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
fix date filter to igrone falsy input
This commit is contained in:
@@ -100,6 +100,12 @@ describe('filter', function(){
|
||||
midnight.getTimezoneOffset =
|
||||
function() { return 7 * 60; };
|
||||
|
||||
it('should ignore falsy inputs', function() {
|
||||
expect(filter.date(null)).toEqual(null);
|
||||
expect(filter.date('')).toEqual('');
|
||||
expect(filter.date(123)).toEqual(123);
|
||||
});
|
||||
|
||||
it('should do basic filter', function() {
|
||||
expect(filter.date(noon)).toEqual(noon.toLocaleDateString());
|
||||
expect(filter.date(noon, '')).toEqual(noon.toLocaleDateString());
|
||||
|
||||
Reference in New Issue
Block a user