Add possibility to extend factory
See original GitHub issueFor example I have a Subscription
model
factory.define('Subscription', Subscription, {
id: factory.seq('id'),
price: 500,
name: 'Pay for 1 month'
})
And want to define factory for ExpiredSubscription
which extends Subsription
.
The same feature is implemented in Ruby’s factory_girl using nested factories.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Add possibility to extend factory · Issue #109 - GitHub
For example I have a Subscription model factory.define('Subscription', Subscription, { id: factory.seq('id'), price: 500, name: 'Pay for 1 ...
Read more >What's the best way to extend the functionality of factory ...
I've now looked over the source, and I think the best way to add a new class is to edit the module directly;...
Read more >Extend factory calendar to 2021 - SAP Community
So I go to the main menu, enter "SCAL" and go to the factory calendar, and I find that all calendars are set...
Read more >Extended Car Warranties: When and How to Say No
If you keep or lease your car for less than the length of your factory coverage, you do not — repeat, do not...
Read more >Is It Possible to Buy an Extended Warranty After ... - Top Speed
Don't know what to do when your car's factory warranty runs out? Fear not, here's a guide to extended warranties to help you...
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 FreeTop 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
Top GitHub Comments
Meanwhile the only way to achieve this is to create a custom adapter. All good except that this adapter relies a bit on implementation details:
Great! Thanks!