-
-
Notifications
You must be signed in to change notification settings - Fork 404
Add expr active item test #8078
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
base: dev/feature
Are you sure you want to change the base?
Conversation
What about tests for setting the entity's active item and confirming that they're correct? |
From my PR description: The positive case (an entity actively using an item) was intentionally not tested, as automating specific AI behavior can be unreliable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good, but I don't think they need to be separate in separate "test" cases. One would suffice (I would call it "ExprActiveItem" or "Active Item")
I restructured to have one test that is "Active Item" for the single entities and another that is "Active Item on Multiple Entities" for multiple entities |
I don't think this is worth adding. There's no test for the actual behavior the syntax provides, since as you said it's not easily testable. |
The test was quick to make. It's here to add if you all want it. If not, that's fine. If everyone decides it shouldn't be added, should it be tracked somewhere that it's not testable? |
Problem
The Skript project has low test coverage. The
ExprActiveItem
expression had no automated tests.Solution
This PR adds tests for
ExprActiveItem
, covering its behavior with single and multiple entities, as well as syntax aliases.Testing Completed
Added the ExprActiveItem.sk syntax test. The full project test suite was run via
.\gradlew skriptTest
and passed successfully.Supporting Information
The positive case (an entity actively using an item) was intentionally not tested, as automating specific AI behavior can be unreliable.
Completes: none
Related: #6158