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

Damage Transaction does not fail if 0 damage is dealt #316

Open
adapap opened this issue Apr 6, 2021 · 6 comments
Open

Damage Transaction does not fail if 0 damage is dealt #316

adapap opened this issue Apr 6, 2021 · 6 comments
Labels
bug Something isn't working testing Issues pertaining to tests

Comments

@adapap
Copy link
Contributor

adapap commented Apr 6, 2021

In the case where zero damage is dealt, such as in the case of an immunity, the test does not fail if you pass in a non-zero expected value for damage.

@adapap adapap added the bug Something isn't working label Apr 6, 2021
@dyc3 dyc3 added the testing Issues pertaining to tests label Apr 6, 2021
@dyc3
Copy link
Member

dyc3 commented Apr 6, 2021

You're referring to the HaveTransaction matcher right? That was intentional, because it would allow us to test things like turn order without necessarily relying on the damage dealt. In hindsight, probably a bad idea.

@adapap
Copy link
Contributor Author

adapap commented Apr 6, 2021

We could alternatively make immunities cause a MoveFailTransaction, but having a nice way to check turn order would be nice (necessary in #198/lagging tail for example).

@dyc3
Copy link
Member

dyc3 commented Apr 6, 2021

I think we should make some test helpers specifically for damage transactions, or have the HaveTransaction matcher take another argument to make it ignore fields on the transaction by name.

@adapap
Copy link
Contributor Author

adapap commented May 4, 2021

Is this closed now @dyc3

@dyc3
Copy link
Member

dyc3 commented May 4, 2021

Not as far as I know

@adapap
Copy link
Contributor Author

adapap commented Sep 2, 2021

Update: I think this also applies for nil moves? e.g. weather not having an associated move attached but dealing some damage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing Issues pertaining to tests
Projects
None yet
Development

No branches or pull requests

2 participants