cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Feature request: Visual immediate feedback in REPL when running tests

Open arcesino opened this issue 3 years ago • 0 comments

I run tests in REPL using commands "Run Tests in Current NS in REPL" and "Run Test Under Caret in REPL" and I've noticed that when I run my integration tests, which usually take a few seconds to complete, then nothing is shown in the REPL until the tests complete and output like below is printed:

Loading integration/some_test.clj done
Running tests in integration/some_test

Ran 5 tests containing 20 assertions.
0 failures, 0 errors.

The issue here is that I always find myself wondering if I activated the command correctly since there's no visual feedback in the REPL that communicates it's working on running the tests. Then, I usually end up activating the command multiple times or waiting for too long if I hit the wrong keyboard shortcut.

One way, hopefully easy, to fix this would be to show some message immediately after you activate the command and then show the rest of the output once the tests complete. For example, right after I activate the "Run Tests in Current NS in REPL" print this in the REPL:

Running tests in integration/some_test

and once the tests complete, print the rest:

Running tests in integration/some_test
Loading integration/some_test.clj done

Ran 5 tests containing 20 assertions.
0 failures, 0 errors.

Even better, print the "Load namespace done" message before running the tests so that you get that feedback as well asap. Likewise for the "Run Test Under Caret in REPL".

arcesino avatar Feb 02 '22 16:02 arcesino