UNPKG

@o3r/testing

Version:

The module provides testing (e2e, unit test) utilities to help you build your own E2E pipeline integrating visual testing.

40 lines 1.44 kB
import { EnvironmentProviders, PipeTransform, Provider } from '@angular/core'; import { LocalizationConfiguration } from '@o3r/transloco'; /** * Mock translations interface to provide to the mock localization provider */ export interface MockTranslations { /** Language code mapped to its translation key-value pairs */ [lang: string]: { /** Translation key mapped to its translated value */ [key: string]: any; }; } /** * Mock pipe for transloco (from \@jsverse/transloco) */ export declare class TranslocoPipeMock implements PipeTransform { /** * Transform method for the mock pipe * @param args Arguments passed to the pipe */ transform(...args: any[]): string | undefined; } /** * Mock pipe for o3rTranslate */ export declare class O3rTranslatePipeMock implements PipeTransform { /** * Transform method for the mock pipe * @param args Arguments passed to the pipe */ transform(...args: any[]): string | undefined; } /** * Provides mock localization configuration for testing * @param localizationConfiguration Localization configuration * @param translations Translations to use * @returns List of providers for the TestBed */ export declare function provideLocalizationMock(localizationConfiguration?: Partial<LocalizationConfiguration>, translations?: MockTranslations): (Provider | EnvironmentProviders)[]; //# sourceMappingURL=transloco-mock.d.ts.map