import { TzOffsetPipe } from './tz-offset.pipe';

describe('TimeRangePipe', () => {
    let pipe: TzOffsetPipe;
    beforeEach(() => {
        pipe = new TzOffsetPipe();
    });
    it('should return empty on empty input', () => {
        expect(pipe.transform(null)).toBe('+00:00');
        expect(pipe.transform(undefined)).toBe('+00:00');
        expect(pipe.transform(NaN)).toBe('+00:00');
        expect(pipe.transform(0)).toBe('+00:00');
    });
    it('should return valid tz offset', () => {
        expect(pipe.transform(90)).toBe('+01:30');
    });
    it('should return valid negative tz offset', () => {
        expect(pipe.transform(-125)).toBe('-02:05');
    });
});
