2017-08-30 20:38:39 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import {TestBed, inject} from '@angular/core/testing';
|
|
|
|
import {DeprecatedI18NPipesModule} from '../src/common_module';
|
2017-09-11 05:34:30 -04:00
|
|
|
import {Plural} from '../src/i18n/locale_data_api';
|
|
|
|
import {DEPRECATED_PLURAL_FN, getPluralCase} from '../src/i18n/localization';
|
2017-08-30 20:38:39 -04:00
|
|
|
|
2017-12-16 17:42:55 -05:00
|
|
|
{
|
2017-08-30 20:38:39 -04:00
|
|
|
describe('DeprecatedI18NPipesModule', () => {
|
|
|
|
beforeEach(() => { TestBed.configureTestingModule({imports: [DeprecatedI18NPipesModule]}); });
|
|
|
|
|
2017-09-11 05:34:30 -04:00
|
|
|
it('should define the token DEPRECATED_PLURAL_FN',
|
|
|
|
inject(
|
|
|
|
[DEPRECATED_PLURAL_FN],
|
|
|
|
(injectedGetPluralCase?: (locale: string, value: number | string) => Plural) => {
|
|
|
|
expect(injectedGetPluralCase).toEqual(getPluralCase);
|
|
|
|
}));
|
2017-08-30 20:38:39 -04:00
|
|
|
});
|
|
|
|
}
|