Skript icon indicating copy to clipboard operation
Skript copied to clipboard

ExprPrefixSuffix Cleanup

Open Asleeepp opened this issue 1 year ago • 4 comments

Description

I've cleaned up some bits in ExprPrefixSuffix, by adding a CompleteableFuture.runAsync, similar to ExprGroup, to prevent any possible stack traces from LuckPerms, i've also added a reset/delete changer.


Target Minecraft Versions: any Requirements: none Related Issues: none

Asleeepp avatar Aug 10 '24 20:08 Asleeepp

Could add some tests

not sure how I do that for this, sorry 😬

Asleeepp avatar Aug 11 '24 17:08 Asleeepp

Could add some tests

not sure how I do that for this, sorry 😬

https://github.com/SkriptLang/Skript/blob/master/src/test/skript/README.md

UnderscoreTud avatar Aug 12 '24 14:08 UnderscoreTud

Could add some tests

not sure how I do that for this, sorry 😬

https://github.com/SkriptLang/Skript/blob/master/src/test/skript/README.md

I think what he means is how would he do tests for this expression exactly

EquipableMC avatar Aug 12 '24 15:08 EquipableMC

You would use JUnit and EasyMock, and mock the Player.class to create a fake player. See ExprMessageTest for an example.

This change request can be void for this pull request due to the fact that the test environments don't run the Vault plugin.

TheLimeGlass avatar Aug 12 '24 15:08 TheLimeGlass