Browse Source

fix: an error for validation-utils test

pull/24530/head
sumeyye 2 weeks ago
parent
commit
e509ab956d
  1. 39
      npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts

39
npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts

@ -1,5 +1,6 @@
import { AbpApplicationConfigurationService, ConfigStateService } from '@abp/ng.core';
import { CoreTestingModule } from '@abp/ng.core/testing';
import { AbpApplicationLocalizationService } from '@abp/ng.core';
import { HttpClient } from '@angular/common/http';
import { Component, Injector } from '@angular/core';
import { createComponentFactory, Spectator } from '@ngneat/spectator/vitest';
@ -32,6 +33,44 @@ describe('ValidationUtils', () => {
'Abp.Identity.Password.RequireDigit': 'True',
},
},
localization: {
values: {},
languages: [],
currentCulture: {
cultureName: 'en',
displayName: 'English',
englishName: 'English',
threeLetterIsoLanguageName: 'eng',
twoLetterIsoLanguageName: 'en',
isRightToLeft: false,
name: 'en',
nativeName: 'English',
dateTimeFormat: {
calendarAlgorithmType: 'SolarCalendar',
dateTimeFormatLong: 'dddd, MMMM d, yyyy',
shortDatePattern: 'M/d/yyyy',
fullDateTimePattern: 'dddd, MMMM d, yyyy h:mm:ss tt',
dateSeparator: '/',
shortTimePattern: 'h:mm tt',
longTimePattern: 'h:mm:ss tt',
},
},
defaultResourceName: null,
resources: {},
languagesMap: {},
languageFilesMap: {},
},
}),
},
},
{
provide: AbpApplicationLocalizationService,
useValue: {
get: () =>
of({
resources: {
Default: { texts: {}, baseResources: [] },
},
}),
},
},

Loading…
Cancel
Save