factory-girl
factory-girl copied to clipboard
concatonating values from chance generator
I wanted a full name consisting of chance.first() and chance.last() but
name: `${factory.chance('first')} ${factory.chance('last')}`
gives me
name: 'function () {\n return generator.generate.apply(generator, args);\n } function () {\n return generator.generate.apply(generator, args);\n }'
If I use the Chance lib directly then I get the same values repeated during a buildMany.
I tried lots of combinations but no joy. Any ideas?