What is the problem this feature would solve?
In the current Bun test package, it is possible to mock a whole modules using the function mock.module (I don't think this feature is documented...). But it doesn't seem like it is possible to revert to the original implementation. I think in multiple situations this feature is needed and popular frameworks like Jest, who seem to be an inspiration for the test package of Bun, implement it.
What is the feature you are proposing to solve the problem?
A mock.revertAllMock function and an object return from the mock.module function with a method to revert to the specific module to its original implementation.
What alternatives have you considered?
I don't have an other idea.
What is the problem this feature would solve?
In the current Bun test package, it is possible to mock a whole modules using the function
mock.module(I don't think this feature is documented...). But it doesn't seem like it is possible to revert to the original implementation. I think in multiple situations this feature is needed and popular frameworks like Jest, who seem to be an inspiration for the test package of Bun, implement it.What is the feature you are proposing to solve the problem?
A
mock.revertAllMockfunction and an object return from themock.modulefunction with a method to revert to the specific module to its original implementation.What alternatives have you considered?
I don't have an other idea.