robust date filter

This commit is contained in:
harttle
2016-12-08 23:25:38 +08:00
parent deca9677dd
commit 89636736a4
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -51,6 +51,9 @@ describe('filters', function() {
it('should create a new Date when given "now"', function() {
return test('{{ "now" | date: "%Y"}}', (new Date).getFullYear().toString());
});
it('should render as empty string when invalid', function() {
return test('{{ "" | date: "%Y"}}', "");
});
});
describe('default', function() {