|
|
@ -25,7 +25,7 @@ describe('DurationPipe', () => { |
|
|
|
|
|
|
|
|
const pipe = new DurationPipe(); |
|
|
const pipe = new DurationPipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(duration, []); |
|
|
const actual = pipe.transform(duration); |
|
|
const expected = '312:10h'; |
|
|
const expected = '312:10h'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -36,7 +36,7 @@ describe('DayPipe', () => { |
|
|
it('should format to day numbers', () => { |
|
|
it('should format to day numbers', () => { |
|
|
const pipe = new DayPipe(); |
|
|
const pipe = new DayPipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(dateTime, []); |
|
|
const actual = pipe.transform(dateTime); |
|
|
const expected = '03'; |
|
|
const expected = '03'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -47,7 +47,7 @@ describe('MonthPipe', () => { |
|
|
it('should format to long month name', () => { |
|
|
it('should format to long month name', () => { |
|
|
const pipe = new MonthPipe(); |
|
|
const pipe = new MonthPipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(dateTime, []); |
|
|
const actual = pipe.transform(dateTime); |
|
|
const expected = 'October'; |
|
|
const expected = 'October'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -58,7 +58,7 @@ describe('FromNowPipe', () => { |
|
|
it('should format to from now string', () => { |
|
|
it('should format to from now string', () => { |
|
|
const pipe = new FromNowPipe(); |
|
|
const pipe = new FromNowPipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(DateTime.now().addMinutes(-4), []); |
|
|
const actual = pipe.transform(DateTime.now().addMinutes(-4)); |
|
|
const expected = '4 minutes ago'; |
|
|
const expected = '4 minutes ago'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -69,7 +69,7 @@ describe('DayOfWeekPipe', () => { |
|
|
it('should format to short week of day string', () => { |
|
|
it('should format to short week of day string', () => { |
|
|
const pipe = new DayOfWeekPipe(); |
|
|
const pipe = new DayOfWeekPipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(dateTime, []); |
|
|
const actual = pipe.transform(dateTime); |
|
|
const expected = 'Th'; |
|
|
const expected = 'Th'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -80,7 +80,7 @@ describe('ShortDatePipe', () => { |
|
|
it('should format to two digit day number and short month name', () => { |
|
|
it('should format to two digit day number and short month name', () => { |
|
|
const pipe = new ShortDatePipe(); |
|
|
const pipe = new ShortDatePipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(dateTime, []); |
|
|
const actual = pipe.transform(dateTime); |
|
|
const expected = '03.Oct'; |
|
|
const expected = '03.Oct'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
@ -91,7 +91,7 @@ describe('ShortTimePipe', () => { |
|
|
it('should format to short time string', () => { |
|
|
it('should format to short time string', () => { |
|
|
const pipe = new ShortTimePipe(); |
|
|
const pipe = new ShortTimePipe(); |
|
|
|
|
|
|
|
|
const actual = pipe.transform(dateTime, []); |
|
|
const actual = pipe.transform(dateTime); |
|
|
const expected = '12:13'; |
|
|
const expected = '12:13'; |
|
|
|
|
|
|
|
|
expect(actual).toBe(expected); |
|
|
expect(actual).toBe(expected); |
|
|
|