Factory 2.1.0 Released #87
hmlongco
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
2.1.0
Factory 2.1 has a set of exciting new features that include...
As mentioned in another post, one of the tentpole features in 2.1 is contexts...
Contexts
Once reason Factory 2.0 leaned heavily into the modifier syntax is that I knew this feature was coming. Now I'm happy to announce it!
Developers often use Factory to mock data for previews and unit tests. Now Factory 2.1 extends these capabilities by allowing them to easily specify dependencies based on the application's current context.
What if, for example, you never want your application's analytics library to be called when running unit tests?
Piece of cake. Just register a new factory closure for that service whenever it runs in that particular context.
Factory provides a variety of contexts for testing, debugging, previews, simulator, device, and for checking passed parameters when running UI tests and checking builds on services like BrowserStack.
As an example of the later:
Now you can have a single build change its behavior based on passed parameters.
Beta Was this translation helpful? Give feedback.
All reactions