Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

test: use correct MockComponent and MockDirective #1090

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented Mar 29, 2022

PR Type

[x] Refactoring (no functional changes, no API changes)

What is the current behavior?

Steps to reproduce:

  1. ng update ng-mocks
  2. npm run test account-overview.component.spec.ts
    MockDirective accepts directives, whereas LazyWishlistWidgetComponent is a component.

      39 |         MockComponent(OrderWidgetComponent),
      40 |         MockDirective(AuthorizationToggleDirective),
    > 41 |         MockDirective(LazyWishlistWidgetComponent),
         |                      ^
      42 |         MockDirective(ServerHtmlDirective),
      43 |         MockPipe(ServerSettingPipe, () => true),
      44 |       ],

What Is the New Behavior?

Corrected usage of MockComponent and MockDirective. This will otherwise break with the next version of ng-mocks.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#75571

@dhhyi dhhyi added refactoring Refactoring of current code community Community contributions labels Mar 29, 2022
@SGrueber SGrueber self-requested a review March 30, 2022 06:58
@SGrueber SGrueber self-assigned this Mar 30, 2022
@SGrueber SGrueber added this to the 2.2 milestone Mar 30, 2022
@SGrueber SGrueber merged commit 8cb9932 into develop Mar 30, 2022
@SGrueber SGrueber deleted the refactor/use-correct-ng-mocks branch March 30, 2022 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contributions refactoring Refactoring of current code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants