We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to return a fixture where the outcome is the result of a async function, but I'm not getting any success. Is that possible or not yet?
The text was updated successfully, but these errors were encountered:
You mean using @Fixture( () => Promise ) ? IIRC that's not supported. Can you show your use case please?
@Fixture( () => Promise )
Sorry, something went wrong.
Thanks for the prompt response @CyriacBr. The case is the following one:
@Fixture(() => hashPassword(faker.random.words())) public password: string;
The function hashPassword uses a library called argon which generates cyphers only using async methods. I can use it like this:
const fakeUsers = fixture .make(User) .with({ password: await hashPassword(faker.random.alphaNumeric(6)), })
But I can't define a fixture using it. It doesn't throw me a linter error, but on the execution fails.
I'll see if this is easily fixable.
No branches or pull requests
I'm trying to return a fixture where the outcome is the result of a async function, but I'm not getting any success. Is that possible or not yet?
The text was updated successfully, but these errors were encountered: