Browse Source

test: add a mock localization pipe to core testing

pull/6651/head
Arman Ozak 6 years ago
parent
commit
8eef49eead
  1. 1
      npm/ng-packs/packages/core/testing/src/lib/pipes/index.ts
  2. 12
      npm/ng-packs/packages/core/testing/src/lib/pipes/mock-localization.pipe.ts

1
npm/ng-packs/packages/core/testing/src/lib/pipes/index.ts

@ -0,0 +1 @@
export * from './mock-localization.pipe';

12
npm/ng-packs/packages/core/testing/src/lib/pipes/mock-localization.pipe.ts

@ -0,0 +1,12 @@
import { Config } from '@abp/ng.core';
import { Injectable, Pipe, PipeTransform } from '@angular/core';
@Injectable()
@Pipe({
name: 'abpLocalization',
})
export class MockLocalizationPipe implements PipeTransform {
transform(value: string | Config.LocalizationWithDefault = '', ..._: string[]) {
return typeof value === 'string' ? value : value.defaultValue;
}
}
Loading…
Cancel
Save