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

Add a helper function to MockService to accept overloads #122

Closed
satanTime opened this issue May 18, 2020 · 0 comments · Fixed by #123
Closed

Add a helper function to MockService to accept overloads #122

satanTime opened this issue May 18, 2020 · 0 comments · Fixed by #123
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@satanTime
Copy link
Member

instead of

const ngbModalRef = MockService(NgbModalRef);
ngbModalRef.componentInstance = certificatesFormMock;
ngbModalRef.close = closeSpy;

to have an option like

const ngbModalRef = MockService(NgbModalRef);
ngbModalRef.__override({
  componentInstance: certificatesFormMock,
  close: closeSpy,
});

ensure that it supports readonly properties and methods too.

@satanTime satanTime added this to the v9.5.0 milestone May 18, 2020
@satanTime satanTime self-assigned this May 18, 2020
@satanTime satanTime added the enhancement New feature or request label May 18, 2020
satanTime referenced this issue in satanTime/ng-mocks May 18, 2020
satanTime referenced this issue in satanTime/ng-mocks May 18, 2020
satanTime referenced this issue in satanTime/ng-mocks May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant