Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed ng test failed tests, due to errors: #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed ng test failed tests, due to errors: #6

wants to merge 1 commit into from

Conversation

alundiak
Copy link

@alundiak alundiak commented Aug 5, 2018

  • "If 'router-outlet' is an Angular component, then verify that it is part of this module"
  • "If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas'"
  • "Error: StaticInjectorError(DynamicTestModule)[ApiService -> HttpClient]"
  • "StaticInjectorError(DynamicTestModule)[HttpClient -> HttpHandler]"
  • "Can't bind to 'routerLink' since it isn't a known property of 'a'"
  • "Can't bind to 'formGroup' since it isn't a known property of 'form'"
  • "Can't bind to 'errorStateMatcher' since it isn't a known property of 'input'"
  • "Can't bind to 'dataSource' since it isn't a known property of 'table'"
  • "Error: StaticInjectorError(DynamicTestModule)[RouterLinkWithHref -> Router]"
  • "No provider for ControlContainer"

Those errors were faced during ng test, and fixed step by step for every it().
Code changes verified with:

  • Node v10.8.0,
  • npm v6.2.0,
  • Angular Core v6.0.2,
  • Angular Material v6.0.2,
  • Angular Forms v6.0.2 and
  • Angualr CLI v6.0.0 (also with globally installed Angular CLI 6.1.2)
  • Also tested code with Angular v6.1.1 but I will create separate PR for that changes.

Related to issue #5

screen shot 2018-08-05 at 15 48 29

- "If 'router-outlet' is an Angular component, then verify that it is part of this module"
- "If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas'"
- "Error: StaticInjectorError(DynamicTestModule)[ApiService -> HttpClient]"
- "StaticInjectorError(DynamicTestModule)[HttpClient -> HttpHandler]"
- "Can't bind to 'routerLink' since it isn't a known property of 'a'"
- "Can't bind to 'formGroup' since it isn't a known property of 'form'"
- "Can't bind to 'errorStateMatcher' since it isn't a known property of 'input'"
- "Can't bind to 'dataSource' since it isn't a known property of 'table'"
- "Error: StaticInjectorError(DynamicTestModule)[RouterLinkWithHref -> Router]"
- "No provider for ControlContainer"

Those errors were faced during `ng test`, and fixed step by step for every it().
Code changes verified with:
- Node v10.8.0,
- npm v6.2.0,
- Angular Core v6.0.2,
- Angular Material v6.0.2,
- Angular Forms v6.0.2 and
- Angualr CLI v6.0.0 (also with globally installed Angular CLI 6.1.2)
@alundiak
Copy link
Author

alundiak commented May 6, 2021

up :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant