-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
createMockList() returns undefined when called with a passed-in function argument #595
Comments
hi @ChrisKanaganayagam-AI ! Thanks for reporting the issue :) I confirm that it's an issue. We currently try to understand the number using the typescript AST. In the scenario where you send a value from another function, it doesn't recognize the 'number'. This is the code that does not translate correctly the number: here and here We'll keep you update.. it shouldn't be too difficult finding the value :) |
Thanks for looking into this so quickly @uittorio . Much appreciated! :) |
…instead of relying on a numeric literal Closes #595
🎉 This issue has been resolved in version 2.6.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Just released @ChrisKanaganayagam-AI !! 💚 💚 💚 💚 💚 |
Thank you very much @uittorio . Much appreciated sir! |
I have a bit of a weird issue when calling createMockList. Whenever I call createMockList with an argument passed into a function denoting how many of the objects I'd like to create, createMockList returns undefined. There are no issues if I hardcode the number in createMockList. Since a picture (or code in this case) might be worth a thousand words, here's something I quickly hacked together to highlight the issue:
Environment
Steps to reproduce
If you are able to run the two test cases above, the first test case fails. Second test case passes.
Expected behavior
We should be able to pass in an arg into a function to specify how many of an object to create with createMockList.
Actual behavior
Whenever an arg is passed into a function to specify the number, createMockList() returns undefined.
The text was updated successfully, but these errors were encountered: