Commit Graph

6 Commits

Author SHA1 Message Date
Micael Levi L. Cavalcante
bc80ef6055 style: fix formatting on everything 2022-08-21 14:23:19 -04:00
Jay McDoniel
1a36c49325 fix(test): fix the mock factory token type 2021-11-10 13:56:24 -08:00
Jay McDoniel
60feebc31c feat: update code for nest v8 2021-11-10 13:35:29 -08:00
Jay McDoniel
c47c269986 feat: add ability to pass a token to the mock factory 2021-11-10 13:01:27 -08:00
Jay McDoniel
6b180398f3 fix: allow for module.get of mocked providers
The providers are still coming back `undefined` so there's still
some work to be done, but it's on it's way to being fully implemented
2021-11-10 13:01:26 -08:00
Jay McDoniel
b059754b9c feat(testing): add auto-mocking capabilities
In the current `Test` module there isn't an easy way to say "If this
dependency doesn't exist use this mock function instead." With this new
`useMocker` fluent function it becomes possible to tell the `TestingInjector`
to replace the undefined dependency with the automocking function. In doing so
classes that have a large number of dependencies no longer must be mocked one-by-one
. This is especially great when it comes to packages like `@golevelup/ts-jest`
which can create mocked dependencies of interfaces and classes with a single function.
I'm sure I've probably missed an edge case in here, so please let me know if you have
any major concerns.
2021-11-10 13:01:24 -08:00