-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
Tests - update test command to show failures #7400
Tests - update test command to show failures #7400
Conversation
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.
I very much like this!
This had a small merge conflict with @Efnilite 's PR since you both edited the same method and it's a bit too messy to resolve in the web editor, you might have to do it locally. |
Ay dios mio ... Ok, ill take a look at this. |
cef8c1f
to
3e54b44
Compare
ok @Moderocky ... 100 commits later this is finally ready. |
Description
This PR aims to fix the
/sk test
command that doesn't show failed tests.NOTE:
Im not 100% sure this is the best way to do things, so Im open to feedback.
Part One:
When running
/sk test something
, it would show a test as passed even though there was a parse error.Exhibit A:
Now you might be thinking "But Shane, you can see the error right there"
Yes, that is true, but if you run a bunch of tests, not as easy to see.
Also, it still shows the test as a pass, but in reality it didn't pass.
Exhibit B:
"Yay everything looks good...."
"Well, I shouldn't have scrolled up.
So to fix this, I created a custom log handler for testing, TestingLogHandler, and added in some stuff to actually log the parse errors for the tests.
Exhibit C:
"Yay, now I know my test[s] failed"
This also fixes them not showing up in the json file.
Part Two:
A lovely side effect of this test is that it also helps users easily spot parsing errors.
These were run with quickTest
BEFORE:
"What? Where are these errors? I need details 😢"
AFTER:
"Omg there it is... test... script... line and all, oh happy day 😃"
Part Three:
I gave the lists some hyphens, to make them look like lists, and add "none" when said list is empty.
Part Four:
This one is small:
}, TestMode.DEV_MODE ? 0 : 50);
Remove the delay starting the test environment if in DEV_MODE!
Target Minecraft Versions: any
Requirements: none
Related Issues: #7399