Skip to content

Commit

Permalink
add tc for parse time only
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Nov 12, 2015
1 parent 300e699 commit 2187872
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ describe('DateTimeFormat', function () {
df.parse(str);
}).throwError(/GregorianCalendarFormat parse error/);
});

it('allow ignore year', function(){
const timeFormatter = new DateTimeFormat('HH:mm:ss');
const value = timeFormatter.parse('17:47:58');
const string = timeFormatter.format(value);
expect(string).to.be('17:47:58');
});
});
});
});

0 comments on commit 2187872

Please sign in to comment.