UNPKG

@apantle/awsome-factory-associator

Version:

Provides a syntax to define factories with any kind of association.

14 lines (11 loc) 308 B
module.exports = (factory) => { factory.define('saleFact', Sale).attr('total', 120); factory.define('saleA', Sale).attr('total', 120); factory .define('saleB', Sale) .attr('total', 120) .assocManyAfter('Tickets', 'ticketA', [ { price: 120 / 2 }, { price: 120 / 2 } ]); };