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

ENHANCEMENT: Async buildOptions on extended factory not taking the base factory values #134

Open
zveljkovic opened this issue Aug 5, 2018 · 1 comment

Comments

@zveljkovic
Copy link

If original factory has async function with buildOptions parameter any factory extending from it will not pick up original attributes.

  factory.define("orig", BasketModel, async (buildOptions = {}) => {
    return {storeId: 1};
  });
  factory.extend("basket", "basketPayed", {
    closed: 66
  });

It works properly if the async part is moved to afterBuild for anyone looking for same issue.

@stewartjarod
Copy link

Thank you for this note!

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

2 participants