Replies: 6 comments 2 replies
-
Yeah, the test output is pretty ugly right now and I've been meaning to overhaul it. I mostly use Judge from my text editor and I diff the source file against the Since you are probably the only person using Judge right now, I'm curious if you have thoughts about:
Do you use the source-patching capabilities at all? I know it's a weird workflow and I could imagine just using Judge as a "regular" test runner. |
Beta Was this translation helpful? Give feedback.
-
Good questions. In order:
So, rolling that all together, imagine something like this:
As to your last question, yes absolutely. I use |
Beta Was this translation helpful? Give feedback.
-
For context, I'm using judge primarily with VS Code from the integrated terminal. It looks like this: |
Beta Was this translation helpful? Give feedback.
-
Something I was thinking could be nice is to print the entire source of a failing test in a kind of diff format: $ judge
# testing src/file.janet
(deftest "some test name"
(def something "hi")
- (test something))
+ (test something "hi"))
Verdict [ynqa?] Instead of just the test name. And then optionally prompt for an action in interactive mode. (Maybe with dots to indicate successful tests? Maybe useful if tests are slow?) Hmm... I might get some time to play with this this weekend. |
Beta Was this translation helpful? Give feedback.
-
Perhaps |
Beta Was this translation helpful? Give feedback.
-
@CFiggers Okay! I've added an interactive mode to Judge, and reworked the output substantially. I think it's a big improvement but I'm curious to get your thoughts. |
Beta Was this translation helpful? Give feedback.
-
This is mostly just to share how I'm using judge, not to pull focus to aesthetics/bikeshedding when functionality is still your focus. :) Feel more than free to ignore.
Taking some inspiration from pyrmont/testament, I made some minor aesthetic updates to my local fork of
judge
.Original:
Updated:
The effect of this is minor when there's only a few tests being run, but the more get added (somewhere around 10 or so) the more this helps readability (IMO).
To make this change I updated just a couple lines of
runner.janet
:You're more than welcome to borrow, modify, improve upon, or disregard entirely however you may see fit.
Beta Was this translation helpful? Give feedback.
All reactions