Skip to content
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

faker.finance.amount with arguments doesn't work #127

Open
kamilwu opened this issue Apr 25, 2023 · 0 comments
Open

faker.finance.amount with arguments doesn't work #127

kamilwu opened this issue Apr 25, 2023 · 0 comments

Comments

@kamilwu
Copy link

kamilwu commented Apr 25, 2023

Hi, If I try to generate some data using faker.finance.amount, mocker-data-generator fails with the following error:

Error: Schema: "example" Error: "faker" Error: Max  10 should be greater than min 5.

Here's a code that can be used to reproduce the issue:

import { faker } from "@faker-js/faker";
import { mocker } from "mocker-data-generator";

mocker()
    .addGenerator("faker", faker)
    .schema("example", { amount: { faker: "finance.amount(5, 10)" } }, 1)
    .buildSync()["example"];

I'm using the following versions:

mocker-data-generator: 3.0.3
@faker-js/faker: 7.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant