-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve testing for model #11
Comments
It's possible to do that with |
It is, but not as easy as snapshotting of final result with Will be cool to have similar snapshots for the intermediate model state. |
unfortunately its not as easy while the app is running, as you might get an "old" "snapshot", of the output, that's why there's the |
It is understandable. But for my app after key press is done it will "freeze". So "snapshot" is possible. |
unfortunately, no, it isn't, as we can't guaranteed that the event was already processed after you send it, so you'll likely end up with a bunch of you could do something like: var snapshot []byte
teatest.WaitFor(t, tm.Output(), func(out []byte) bool {
snapshot = out
return true
}, teatest.WithDuration(time.Second), teatest.WithCheckInterval(time.Millisecond*100))
// verify snapshot but I don't see how that's better than doing it inside Forgot to add earlier: as for the model throughout the run, you have it when you start the test, so you can test it directly. |
Oh, you can also read |
For some reason it is nil. But the snapshot technic works. |
For example, I'd like to test my https://fx.wtf app. But right now testea only tests final output (which is 0 for fx).
I'd like to be able to send keystrokes and check intermediate results (same with -update model).
The text was updated successfully, but these errors were encountered: