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

Automatic mock/mocking #11018

Open
hussain-s6 opened this issue May 12, 2024 · 0 comments
Open

Automatic mock/mocking #11018

hussain-s6 opened this issue May 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hussain-s6
Copy link

What is the problem this feature would solve?

Automatic mocking. I believe it's available in jest: https://jestjs.io/docs/jest-object#jestcreatemockfrommodulemodulename
(and maybe: https://jestjs.io/docs/es6-class-mocks#automatic-mock)

The idea is that: A package I would like to be ignored has too many types, classes, interfaces, objects, etc. And they all have too many child properties etc. To mock it, (especially without requireActual), you have to manually include all the classes/properties being used and their child properties. This is very time consuming.

Is there a way to achieve this in bun test?

What is the feature you are proposing to solve the problem?

Automatic mocking of all classes/properties inside a module.

What alternatives have you considered?

Searching docs. Attempted to use the jest equivalent to no avail.

@hussain-s6 hussain-s6 added the enhancement New feature or request label May 12, 2024
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

No branches or pull requests

1 participant