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

Make createSpyObject public #316

Closed
kremerd opened this issue Jun 9, 2020 · 2 comments
Closed

Make createSpyObject public #316

kremerd opened this issue Jun 9, 2020 · 2 comments

Comments

@kremerd
Copy link
Contributor

kremerd commented Jun 9, 2020

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

createSpyObject is public api for Jasmine, but only internal for Jest.

Expected behavior

It should be public api for both environments.

Minimal reproduction of the problem with instructions

Not applicable.

What is the motivation / use case for changing the behavior?

For homogeneity it's desireable to manually mock objects in the same way that spectator mocks objects automatically. In fact that's already possible with public api by using mockProvider(type, properties).useFactory(). However that's rather unintuitive to write out all the time ;).

Environment

Not relevant.

@NetanelBasal
Copy link
Member

You're welcome to submit a PR.

kremerd pushed a commit to kremerd/spectator that referenced this issue Jun 10, 2020
@kremerd
Copy link
Contributor Author

kremerd commented Jun 10, 2020

Done ;).

NetanelBasal pushed a commit that referenced this issue Jun 11, 2020
Co-authored-by: Dominik Kremer <dominik.kremer@yatta.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants