-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
refactor: simplify module creation #2485
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #2485 +/- ##
==========================================
+ Coverage 99.57% 99.58% +0.01%
==========================================
Files 2819 2820 +1
Lines 255134 255037 -97
Branches 1095 1080 -15
==========================================
- Hits 254050 253984 -66
+ Misses 1056 1025 -31
Partials 28 28
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add extend the test factory (or write a separate one) to include automatic test for these this
bindings on all methods? Currently I'm not 100% sure that I can do.
const method = faker[moduleKey][methodKey];
method();
Additionally, while being a nice little addition I have a hard time seeing the advantage of introducing it now.
We already have that: faker/test/support/seededRuns.ts Lines 146 to 147 in a193693
|
Simplifies the modules by reusing the constructors from a shared module base.
This is a v8.x only feature, that will likely be obsolete in v9.0.
What do you think?