blob: 5c14437f27f5be6431305726a876df25074dd727 [file] [log] [blame]
/* tslint:disable:no-unused-variable */
import { TestBed } from '@angular/core/testing';
import { FormattedTimestampPipe } from './formatted-timestamp.pipe';
describe('Test FormattedTimestampPipe ', () => {
const pipe = new FormattedTimestampPipe();
it('should perform correct with different inputs ', () => {
expect( pipe.transform('xxx') ).toBeNull();
expect( pipe.transform( null ) ).toBe('');
expect( pipe.transform( '' ) ).toBe('');
expect( pipe.transform( undefined ) ).toBe('');
const dateTest = pipe.transform( '19.11.2017 13:16');
expect( dateTest.match('[0-3][0-9]\.[0-1][0-9]\.[0-9]{4} [0-2][0-9]:[0-5][0-9]') ).toBeTruthy() ;
});
});