04656950cb
Adds a custom date pipe and use it on the projector The date pipe accepts unix time, can automatically adjust date to the current language and supports custom formatting using "moment.js" formatting options Also fixes a minor translate-tag error
21 lines
642 B
TypeScript
21 lines
642 B
TypeScript
import { inject, TestBed } from '@angular/core/testing';
|
|
|
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
|
|
import { LocalizedDatePipe } from './localized-date.pipe';
|
|
|
|
describe('LocalizedDatePipe', () => {
|
|
beforeEach(() => {
|
|
TestBed.configureTestingModule({
|
|
imports: [TranslateModule.forRoot()],
|
|
declarations: [LocalizedDatePipe]
|
|
});
|
|
TestBed.compileComponents();
|
|
});
|
|
|
|
it('create an instance', inject([TranslateService], (translate: TranslateService) => {
|
|
const pipe = new LocalizedDatePipe(translate);
|
|
expect(pipe).toBeTruthy();
|
|
}));
|
|
});
|