From 811d300d49dd4b8abe0652f18fed96f6e0978c7b Mon Sep 17 00:00:00 2001 From: FourierTransformer Date: Mon, 11 May 2026 06:04:16 -0500 Subject: [PATCH] hide expected unless in use and updated roadmap --- build/tested/results/terminal.lua | 15 ++++++++++++--- docs/roadmap.md | 17 +++++++++++++---- src/tested/results/terminal.tl | 15 ++++++++++++--- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/build/tested/results/terminal.lua b/build/tested/results/terminal.lua index 5e6b78b..9041e6a 100644 --- a/build/tested/results/terminal.lua +++ b/build/tested/results/terminal.lua @@ -126,11 +126,20 @@ function terminal.summary(output) tostring(output.total_counts.passed), " passed%{reset}, %{red}", tostring(output.total_counts.failed), - " failed%{reset}, ", - tostring(output.total_counts.expected), - " expected\n") + " failed%{reset}") + + if output.total_counts.expected > 0 then + tadd.add( + ", ", + tostring(output.total_counts.expected), + " expected") + + end + + tadd.add("\n") + tadd.add( "Other: %{yellow}", tostring(output.total_counts.skipped), diff --git a/docs/roadmap.md b/docs/roadmap.md index 67c8dae..1fda0eb 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -2,13 +2,22 @@ I'm planning to start off by seeing if `tested` catches on, and see what features/criticism/feedback people give and likely go from there. I'm planning to wait a bit (could be a year) before fully committing to a v1 and stabilizing the CLI and API. -Things that I am one day planning to add: +Things that I am one day planning to add (in no particular order): -- [x] A TAP formatter [#21](https://github.com/FourierTransformer/tested/issues/21) -- [ ] A [pure Lua](./pure-lua.md) single-file distribution [#20](https://github.com/FourierTransformer/tested/issues/20) +- [ ] Test options [#35](https://github.com/FourierTransformer/tested/issues/35) + - [x] Expected Statuses + - [x] `run_when` for conditional running tests + - [ ] `retries` and (maybe) `retry_timeout` for automatically retrying failing tests + - [ ] tags for filtering +- [ ] Lifecycle management (`before`, `after`, `before_each`, `after_each`) +- [ ] Table driven assertion (no more for loops around asserts!) +- [ ] Stubbing +- [ ] Mocking +- [ ] A [pure Lua](./pure-lua.md) single-file (maybe two files) distribution [#20](https://github.com/FourierTransformer/tested/issues/20) + - Should allow for embedding (on devices, maybe with Neovim and Love2d? ) - [ ] File output (alongside terminal) - A cool fancy HTML output with the tests and coverage could be fun [#14](https://github.com/FourierTransformer/tested/issues/14) + - Likely JSON as well - [ ] Test timeouts [#3](https://github.com/FourierTransformer/tested/issues/3) -- [ ] Likely other things as well! If there are any things you would really want to see added to a Unit testing framework, feel free to [open up a discussion](https://github.com/FourierTransformer/tested/discussions/new/choose). I'm currently open to new ideas! \ No newline at end of file diff --git a/src/tested/results/terminal.tl b/src/tested/results/terminal.tl index 256a2f2..02959fb 100644 --- a/src/tested/results/terminal.tl +++ b/src/tested/results/terminal.tl @@ -126,10 +126,19 @@ function terminal.summary(output: types.TestRunnerOutput) tostring(output.total_counts.passed), " passed%{reset}, %{red}", tostring(output.total_counts.failed), - " failed%{reset}, ", - tostring(output.total_counts.expected), - " expected\n" + " failed%{reset}" ) + + -- only add expected if they are using it. Try to avoid confusing new users. + if output.total_counts.expected > 0 then + tadd.add( + ", ", + tostring(output.total_counts.expected), + " expected" + ) + end + + tadd.add("\n") tadd.add( "Other: %{yellow}",