Skip to content

Be able to return all types of a factory easily #7

@blakewest

Description

@blakewest

I'd like to be able to build a list of multiple types of factories at the same time.

Something like... Replicator.build('user', {rainbow: true}, 3) // would return regular user, plus user with trait('hasCard') + user with trait('withEmail'). Or whatever. But return one instance of each type of User, in an array.

Or better yet, come up with an elegant syntax for building an array of different types of Factories from your choice.

Basically... trying to avoid doing

var invoiceList = [ Replicator.embed('invoice'), Replicator.embed('invoice', {'failed': true}), Replicator.embed('invoice', {'paidWithCash': true}) ]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions