For some odd reason, the function "isNaN" no longer works in GameTest scripts as of 1.17.40. It always returns false, even the value passed in is `NaN`.
Steps to Reproduce:
Make a behaviour pack with a Gametest script that does the followings (Updated for 1.18.10):
world.getDimension('overworld').runCommand(`say ${isNaN(NaN)}`);
Import the pack to a world (Gametest framework enabled) and run it.
Observed Results:
Chat says
false
Expected Results:
Chat should say
true
Notes:
Fortunately this can worked around by comparing the value to itself, but it would be great if a common function such as this works as intended.
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
Is this still an issue in the latest version? If so, can you please add it to the affected versions (or mention it if you are not the reporter).
Also, just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki