CentreForDigitalHumanities / CentreForDigitalHumanities/Textcavator
Get corpus mock data in common-test-bed working again
- Dominant language
- Python
- Stars
- 12
- Forks
- 3
- Avg merge
- 3d 3m
- Merged PRs (30d)
- 9
Description
The introduction of the `param-directive` made it necessary to use Angular's [RouterTestingModule](https://angular.io/api/router/testing/RouterTestingModule) in lieu of the `ActivatedRoute` provider we had before:
```
{
provide: ActivatedRoute, useValue: {
paramMap: of(<{ corpus: corpus.MockCorpusName }>{ corpus: 'test1' }).subscribe(convertToParamMap)
}},
```
Find out how to make sure that we simulate the route being on "test1", so tested components will correctly retrieve that corpus from the `ApiServiceMock` again. Perhaps [this article](https://dev.to/this-is-angular/testing-angular-routing-components-with-the-routertestingmodule-4cj0) can help?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.