-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
@jsilvestre Can I merge this PR? |
.catch (err) -> | ||
if err instanceof Mockaroo.errors.InvalidApiKeyError | ||
err = 'invalid api key' | ||
else if err instanceof Mockaroo.errors.UsageLimitExceededError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that this line is less than 80 chars wide?
Ok, so tests are passing locally on a cozy base instance, and fail when passing on a freshly resetted db (w/ |
Why did you rename |
I renamed it to |
Mockaroo use babel, babel use core-js, core-js break chai zloirock/core-js#89 |
@aenario I don't see what you mean… broken tests on a resetted cozy db instance aren't due to the mockaroo addition : they'll break on the master branch too 😞. I haven't any issue running the auto-generation fixtures. |
Ok, About your bug @m4dz it's probably due to requests that are not declared (if the bug occurs only on empty database). |
I agree, I'm totally convinced by the theory of the "s" defective key 😆.
Yep. I'll try to fix it today. |
Ok, so:
So, now we have a culprit, i'll fix the assertions 😑 to bypass the issue… |
As well as the issue is fixed in the core-js 1.0.0 branch, I've just submitted a patch to Mockaroo to update their deps as well : mockaroo/mockaroo-node#1. |
So, what's the status of this PR ? @m4dz, @jsilvestre ? |
The code is fully functional, but the tests always fail due to the bug mentioned by @aenario, and the PR on Mockaroo is still alive. I suggest we could merge this one (even with the tests failing) as we use it intensively (eg on Contacts for now), and I will up my PR on Mockaroo to fix the bug :) |
Auto-generation fixtures
This PR allow defining fixtures as a model for Mockaroo service and then auto-generate and import fixtures on the fly. It adds two new floags to the CLI:
-g
to enable the auto-generation service-n
to specify the number of records wantedNote that it need an API key (freely available) available in the MOCKAROO_API_KEY env variable.