-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace server author services specific data generators with fake-data-generator #161
Comments
Hi @sgobotta, If nobody is working on this issue, I'll be glad to help ! |
Hi @jphetphoumy, all yours. Let me know if you need any help of any kind. I think the |
Hi ! I tried to do some test with the fake-data-generator but it does not seems to work as expected. I tried the following code : // Requires the package
const { generateModel } = require('fake-data-generator')
// Requires a model
const model = require('./models/authors.json')
// Generate the model
const amountArg = 50
const modelArg = 'authors'
const outputType = 'object'
const generatedModel = generateModel({ amountArg, modelArg, outputType }) if
I looked at the So here the question, Do I need to make a pull request to const modelData = require(`../models/${modelName}`) by const modelData = require(path.resolve(`${__dirname}/../models/${modelName}`)) to get the current path ? |
Oh, it looks kind of horrible. I didn't know the state of the generator when used as an npm dependency. I think the solution is a bit more comples than looking for a .json in the right place. Anyhow, I'll open an issue in |
Alright, I've just released v0.1.7 for the |
Cool ! I'll take a look at the issue today ! |
Hi ! I Have looked into the issue, but the faker date.between doesn't seem to work. I read the fakerjs documentation and It seems that we need to pass some argument to the faker data.between to generate a date : http://marak.github.io/faker.js/faker.date.html But I think that fake-data-generator can not handle argument yet : https://github.com/Cambalab/fake-data-generator/blob/develop/README.md#faker Also, I didn't see any unit test or e2e test for the authors.js Would you like me to write them ? |
Okay, I've just published
Just e2e tests :) you can find them here. And you don't even have to implement them, just check they're passing ; ) |
In the utils server we are using too many custom functions for the authors fake data. We could replace that using the fake-data-generator as a dev-dependency.
Current models: please respect the current type of each property
Checkpoints:
The text was updated successfully, but these errors were encountered: