Should IDEs offer a link between functions and unit tests as a first class construct? It would enable some interesting features.
Related Posts
Has anyone built a great solution to 'run all my unit tests automatically'?
It's straightforward to write a while loop in bash, but handling timeouts, syntax errors etc well is hard.
Running on save would be good, although I wonder if you could run fast tests on each keystroke.
I'm experimenting with live-evaluating tests in my programming language project.
It's relatively fiddly to hook up a UI for this, but it saves a precious keystroke to run the tests! I'm hoping that it results in more, better tests due to the convenience.
Go has an elegant approach to defining example functions, which are shown in docs as `main()` with the output: https://go.dev/blog/examples