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

graph model #384

Open
unional opened this issue Nov 12, 2022 · 0 comments
Open

graph model #384

unional opened this issue Nov 12, 2022 · 0 comments

Comments

@unional
Copy link
Collaborator

unional commented Nov 12, 2022

The design of 7.0 already loosely following this, but can make it more formal which can help simplifying the code and improving certain use cases.

During simulation, some references will be stubs to simulate the behavior and some will be spy to validate the behavior.
This is done by analyzing the relationship between the references.

It's like this:

If the target/subject is a function and it is invoked with some arguments, you should validate the input so they should be spy?
If the target/subject is a function and it was invoked and now returning a value, it should be stub?

There are more complex cases such as the argument is an object which is accessed by the code outside of the subject after a call in invoked. So while within the subject it should be stub, but outside the subject it should be spy.
These cases are not currently covered.

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

1 participant