$ show adopted-ember-addons/ember-data-factory-guy
Ember Data Factory Guy is an Ember.js addon designed for factory-based testing in Ember Data applications. It replaces traditional fixtures with factory definitions to generate test data, providing methods like `make`, `build`, and `mock*` for creating and persisting test records. The addon includes request mocking capabilities supporting both Pretender and MSW libraries, scenario management for test setup, and serializer-specific builders/converters for JSONAPI, REST, JSON, and ActiveModel formats. Architecture follows Ember addon conventions with a clear separation between core factory logic, adapter-specific handling, and mocking abstraters. The test application demonstrates usage patterns but is not the primary product.
The LLM identified 1 files worth highlighting for reuse:
Provides a unified interface for request mocking that works with both Pretender and MSW libraries. Implements the Strategy pattern to encapsulate differences between mocking libraries, allowing the rest of the codebase to remain agnostic of the underlying implementation. The main request manager dynamically selects the available mocking library and offers a consistent API for mocking/unmocking requests. This abstraction is highly reusable in any Ember project needing adapter-agnostic HTTP interception during tests.