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

new adapter + babel setup

Open jamesdixon opened this issue 7 years ago • 2 comments

Hi,

I'm working on an adapter for Objection.js and ran into the following error when attempting to run tests for it:

ObjectionAdapter #build builds the model:
     TypeError: Class constructor Model cannot be invoked without 'new'
      at new DummyObjectionModel (test/test-helper/DummyObjectionModel.js:32:145)

Looking at the Objection repo, they claim it has something to do with the Babel setup.

Do you have any thoughts on what would need to be changed to make things work with the current Factory Girl setup? I'm a complete newb with regards to Babel, so was hoping you might have some advice.

Thanks!

jamesdixon avatar Jun 09 '17 04:06 jamesdixon

Yes, we have been facing this issue too. We had to hack the babel config, I can't remember how.

oliviertassinari avatar Aug 22 '17 16:08 oliviertassinari

@oliviertassinari any chance you could share your babel config? Would be greatly appreciated!

jamesdixon avatar Aug 22 '17 17:08 jamesdixon