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

Feature Request: MockBuilder strict mode with standalone components #7800

Open
satanTime opened this issue Dec 25, 2023 Discussed in #7577 · 0 comments
Open

Feature Request: MockBuilder strict mode with standalone components #7800

satanTime opened this issue Dec 25, 2023 Discussed in #7577 · 0 comments

Comments

@satanTime
Copy link
Member

Discussed in #7577

Originally posted by StavNoyAkur8 November 22, 2023
Strict mode is a great feature.

It is activated when passing 2+ parameters - typically the tested component and it's module.
But standalone components don't have a module to pass as a second parameter.

We can simply pass null as the second parameters, or an empty array (which would usually be used for keeping multiple modules), but that's not obvious, and hard to enforce on a large project:

MockBuilder(TargetComponent, null);
MockBuilder(TargetComponent, []);

What I'd like: Detect that a component is standalone, make it activate strict mode.

Alternative: Allow global config of strict mode the default, regardless of standalone. Probably a bigger feature altogether

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

1 participant