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

Can as-pect mock functions, and expect "toHaveBeenCalled" ? #361

Open
xiong-pro opened this issue Jun 24, 2021 · 2 comments
Open

Can as-pect mock functions, and expect "toHaveBeenCalled" ? #361

xiong-pro opened this issue Jun 24, 2021 · 2 comments

Comments

@xiong-pro
Copy link

xiong-pro commented Jun 24, 2021

Hi, how can I test a function (A), which will call another function (B).
I expect the B will be called, when I call A.

@xiong-pro xiong-pro changed the title Can as-pect mock functions, and expect toHaveBeenCalled? Can as-pect mock functions, and expect "toHaveBeenCalled" ? Jun 24, 2021
@jtenner
Copy link
Contributor

jtenner commented Jun 24, 2021

Not yet. This is something I plan on looking into.

@jtenner
Copy link
Contributor

jtenner commented Jan 13, 2022

I don't believe closures will be supported anytime soon. On top of this, we don't keep track of when functions are called, what function indexes are used, and this would be a feature that AssemblyScript is not good at providing. I think we should close this issue and mark as "wontfix." Perhaps some day we can add this feature.

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