Skript icon indicating copy to clipboard operation
Skript copied to clipboard

JUnit Testing Environment Broken

Open Absolutionism opened this issue 1 year ago • 3 comments

Skript/Server Version

skriptTestDev

Bug Description

JUnit testing environment doesn't support tests that take tick(s) to actually take affect in order for assertions or conditions to pass.

Expected Behavior

It should

Steps to Reproduce

Create a test within the JUnit testing environment that requires a tick for assertions and conditions to pass.

Errors or Screenshots

No response

Other

Please excuse my lack of information on this bug report as I don't know too much about this, nor the testing environments itself, but was told to make a bug report.

Agreement

  • [x] I have read the guidelines above and affirm I am following them with this report.

Absolutionism avatar Feb 08 '25 18:02 Absolutionism

Hey, what would be a short example of such a test that is currently impossible to successfully write?

Nicofisi avatar Jun 10 '25 21:06 Nicofisi

Hey, what would be a short example of such a test that is currently impossible to successfully write?

It was noticeable when making a JUnit test for EffGoatHorns when growing/removing horns of a goat. It would seem that when changing the horns of the goat, it would be taking a tick or two, server side, to actually complete it or reflect the new change. Discord

Absolutionism avatar Jun 10 '25 21:06 Absolutionism

https://github.com/SkriptLang/Skript/pull/7479/commits/f0944e759860642eca50a3f8fe916a8930b1c581

so in a junit test where there's a delay in the skript file that handles an event called by the java code. i'm guessing this is because the objectives aren't completed all at once.

Efnilite avatar Jun 10 '25 21:06 Efnilite