If I have this mock activatedRoute below I can write some tests when type is 'mismatch', but if I want to write some tests where type is 'admin-mismatch'. How do I change the value of the the query params?
await TestBed.configureTestingModule({
declarations: [ErrorPageComponent],
imports: [GraphQLModule, RouterTestingModule],
providers: [
Apollo,
{
provide: ActivatedRoute,
useValue: {
queryParams: of({
name: 'John Doe',
cacheKey: 'cacheKey',
type: 'mismatch'
})
}
},
]
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ErrorPageComponent);
component = fixture.componentInstance;
route = TestBed.inject(ActivatedRoute);
fixture.detectChanges();
});