diff --git a/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts b/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts index 8aab44d44b..5a37476c92 100644 --- a/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts +++ b/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts @@ -16,6 +16,7 @@ import { provideRoutes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { MockPermissionService } from './services/mock-permission.service'; import { MockRestService } from './services/mock-rest.service'; +import { LocalizationPipe } from './mocks'; /** * CoreTestingModule is the module that will be used in tests @@ -24,6 +25,7 @@ import { MockRestService } from './services/mock-rest.service'; @NgModule({ exports: [RouterTestingModule, BaseCoreModule], imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule], + declarations: [LocalizationPipe], }) export class CoreTestingModule { static withConfig( diff --git a/npm/ng-packs/packages/core/testing/src/lib/mocks/index.ts b/npm/ng-packs/packages/core/testing/src/lib/mocks/index.ts new file mode 100644 index 0000000000..ded59c53f6 --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/mocks/index.ts @@ -0,0 +1 @@ +export * from './pipes'; diff --git a/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/index.ts b/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/index.ts new file mode 100644 index 0000000000..7bbacf6329 --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/index.ts @@ -0,0 +1 @@ +export * from './localization.pipe'; diff --git a/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/localization.pipe.ts b/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/localization.pipe.ts new file mode 100644 index 0000000000..784b8c3418 --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/mocks/pipes/localization.pipe.ts @@ -0,0 +1,11 @@ +import { Injectable, Pipe, PipeTransform } from '@angular/core'; + +@Injectable() +@Pipe({ + name: 'abpLocalization', +}) +export class LocalizationPipe implements PipeTransform { + transform(value: string): string { + return value; + } +} diff --git a/npm/ng-packs/packages/core/testing/src/public-api.ts b/npm/ng-packs/packages/core/testing/src/public-api.ts index 657f628e28..5b741ca0ff 100644 --- a/npm/ng-packs/packages/core/testing/src/public-api.ts +++ b/npm/ng-packs/packages/core/testing/src/public-api.ts @@ -1,3 +1,4 @@ export * from './lib/core-testing.module'; export * from './lib/services'; export * from './lib/utils'; +export * from './lib/mocks';