13, 6, 4 is being parsed as a string and passed into address.longitude as the first parameter, which leads to some weird output by faker.
Simple & stupid workaround without rewriting the parsing logic:
Maybe we can spread the params into the function if it is parsed as an array (address.longitude([13, 6, 4])) so there is some way to use the function (although then we would need to write helpers.arrayElement(["a", "b"]) as helpers.arrayElement([["a", "b"]])).
Trying to use functions like
address.latitude
(https://fakerjs.dev/api/address.html#latitude) with multiple parameters does not work.Take this example:
latitude
becomesNaN
and this leads to an error.The problem arises from around here:
https://github.com/getbigger-io/prisma-fixtures/blob/bed45fdf82af1002cd51c527d71f5b0b5757884d/src/parsers/FakerParser.ts#L93-L104
13, 6, 4
is being parsed as a string and passed intoaddress.longitude
as the first parameter, which leads to some weird output by faker.Simple & stupid workaround without rewriting the parsing logic: Maybe we can spread the params into the function if it is parsed as an array (
address.longitude([13, 6, 4])
) so there is some way to use the function (although then we would need to writehelpers.arrayElement(["a", "b"])
ashelpers.arrayElement([["a", "b"]])
).