OpenSlides/client/src/app/shared/pipes/localized-date.pipe.spec.ts
Sean Engelhardt 04656950cb Add custom date pipe
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
2019-10-15 12:20:22 +02:00

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();
}));
});