Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
id: 42,
date: '2001-02-28',
type: 'WEDDING',
location: 'ABROAD'
},
{
id: 43,
date: '2003-03-29',
type: 'DIVORCE',
location: 'FRANCE'
}
];
person = { id: 1, firstName: 'JB', lastName: 'Nizet' } as PersonModel;
route = fakeRoute({
snapshot: fakeSnapshot({data: {events}})
});
const weddingEventService: WeddingEventService =
jasmine.createSpyObj('weddingEventService', ['list', 'create', 'delete']);
const confirmService: ConfirmService =
jasmine.createSpyObj('confirmService', ['confirm']);
TestBed.configureTestingModule({
declarations: [
PersonWeddingEventsComponent,
DisplayWeddingEventTypePipe,
ValidationDefaultsComponent,
DisplayLocationPipe,
PageTitleDirective,
FullnamePipe
beforeEach(async(() => {
jasmine.clock().mockDate(DateTime.fromISO('2018-04-30T15:30:00').toJSDate());
person = {
id: 1
} as PersonModel;
memberships = [];
const route = fakeRoute({
snapshot: fakeSnapshot({
data: {
memberships
}
})
});
TestBed.configureTestingModule({
declarations: [
PersonMembershipsComponent,
DisplayPaymentModePipe,
ValidationDefaultsComponent,
PageTitleDirective,
FullnamePipe
],
providers: [
beforeEach(async(() => {
profile = {
login: 'joe',
admin: true,
email: 'joe@nowhere.com',
taskAssignmentEmailNotificationEnabled: true
} as ProfileModel;
const route = fakeRoute({
snapshot: fakeSnapshot({
data: { profile }
})
});
TestBed.configureTestingModule({
declarations: [ ProfileComponent ],
imports: [
GlobeNgbModule.forRoot(),
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
ValdemortModule
],
providers: [
{ provide: ActivatedRoute, useFactory: () => route }
monthlyAmount: 400
},
{
id: 15,
type: { name: 'Electricité'},
monthlyAmount: 50
}
] as Array;
const perUnitRevenueInformation: PerUnitRevenueInformationModel = {
adultLikeCount: 4,
childCount: 2,
monoParental: true
};
const activatedRoute = fakeRoute({
snapshot: fakeSnapshot({
data: {
incomes,
charges,
perUnitRevenueInformation
}
})
});
let tester: PersonResourcesTester;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule, RouterTestingModule, GlobeNgbModule.forRoot()],
declarations: [PersonResourcesComponent, PageTitleDirective, FullnamePipe],
providers: [
beforeEach(async(() => {
route = fakeRoute({});
TestBed.configureTestingModule({
declarations: [ PersonDeathComponent, FullnamePipe ],
imports: [
HttpClientTestingModule,
GlobeNgbModule.forRoot(),
ValdemortModule,
RouterTestingModule,
ReactiveFormsModule
],
providers: [
{ provide: ActivatedRoute, useValue: route },
{ provide: LOCALE_ID, useValue: 'fr-FR' },
]
});
beforeEach(async(() => {
const member1: NetworkMemberModel = {
id: 42,
type: 'DOCTOR',
text: 'Dr. No'
};
const member2: NetworkMemberModel = {
id: 43,
type: 'LAWYER',
text: 'Dr. Yes'
};
route = fakeRoute({
snapshot: fakeSnapshot({
data: {
members: [ member1, member2 ]
}
})
});
TestBed.configureTestingModule({
declarations: [
PersonNetworkMembersComponent,
DisplayNetworkMemberTypePipe,
ValidationDefaultsComponent,
PageTitleDirective,
FullnamePipe
],
providers: [
beforeEach(async(() => {
route = fakeRoute({
snapshot: fakeSnapshot({
data: {
}
})
});
TestBed.configureTestingModule({
declarations: [PersonFamilyComponent, SituationComponent, PageTitleDirective, FullnamePipe],
providers: [
FamilyService,
ConfirmService,
{ provide: ActivatedRoute, useFactory: () => route }
],
imports: [
HttpClientTestingModule,
RouterTestingModule,
beforeEach(() => {
participations = [
{
id: 42,
activityType: 'MEAL'
}
];
person = { id: 1, firstName: 'JB', lastName: 'Nizet' } as PersonModel;
route = fakeRoute({
snapshot: fakeSnapshot({data: {participations}})
});
currentPersonService = { snapshot: person } as CurrentPersonService;
});