TestingModuleBuilder is missing overrideModule
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe.
I want to use mock modules to override functionalities of the module instead of overriding internals of the module again and again.
Describe the solution you’d like
A overrideModule
method similar to overrideProvider
would solve the issue, example:
Test.createTestingModule({
...
})
.overrideModule(LoggerModule)
.useClass(LoggerTestingModule)
.compile();
What is the motivation / use case for changing the behavior?
For the cases of e2e / integration testing in a project with many encapsulated libraries / modules it would be very helpful to be able to override entire modules instead of overriding internals of the modules every time the module is part of a testing module.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:26
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Testing | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines ...
Read more >nestjs/testing.TestingModuleBuilder.createTestingModule ...
Best JavaScript code snippets using @nestjs/testing.TestingModuleBuilder.createTestingModule(Showing top 15 results out of 1,395).
Read more >angular Testbed overrideModule not working - Stack Overflow
So in fact we don't add it to the test module's declaration, but to the original Module: // Add the imported module to...
Read more >HOW TO GET THE TEST OVERRIDE MODULE IN ... - YouTube
HOW TO GET THE TEST OVERRIDE MODULE IN SUBNAUTICA BELOW ZERO ... Merchandise ▻ https://teespring.com/stores/ miss -luc.
Read more >Test Override Module Subnautica Below Zero - YouTube
In this video I will show you the location where you can find the test override module blueprint Subnautica Below Zero.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Do we have any updates on the PR? https://github.com/nestjs/nest/pull/8777
I could really use this feature! 😃
I will build a solution if i can find some time