Skip to content
Snippets Groups Projects
Commit c319539a authored by OZGCloud's avatar OZGCloud
Browse files

fix date test

parent 61263576
No related branches found
No related tags found
No related merge requests found
......@@ -13,14 +13,13 @@ describe('FormatToPrettyDatePipe', () => {
});
//TODO: Test stabiler machen
it('should return formatted for this year', () => {
const date: Date = new Date();
date.setDate(date.getDate() + 3);
const year: number = new Date().getFullYear();
const date: Date = new Date(year + '-01-01');
const result: string = pipe.transform(date);
expect(result.length).toBeLessThan(9);
expect(result).toBe('01. Jan.');
})
it('should format in "dd.MM.yyyy"', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment