factory-girl icon indicating copy to clipboard operation
factory-girl copied to clipboard

concatonating values from chance generator

Open jnicho02 opened this issue 6 years ago • 0 comments

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?

jnicho02 avatar Mar 26 '18 14:03 jnicho02