I ❤️ mini.test #1616
Replies: 1 comment 1 reply
-
Thanks for the kind words! 'mini.test' also ❤️ you for using it and writing tests for Neovim plugins :) Aside from clean setup for any test case, one of the biggest test improvements from 'mini.test' child process for me was the ability to use screenshots. It is truly invaluable way of testing a visual side of things which is usually hard/verbose/brittle to do otherwise: extmarks with highlights or virtual text, gutter content, floating windows position/border/title/etc, and more. I'd also point out that overall idea of using child process and screenshots is not novel to 'mini.test': Neovim itself uses similar concept and it was the starting point for making a more user-friendly and robust version for plugin authors. |
Beta Was this translation helpful? Give feedback.
-
I just wanna throw some love by the way of mini.test. I'm in the middle of a big refactor for my plugin, CodeCompanion. Long story short, we have a feature that allows LLMs to run tools on a user's machine. These can be lua functions or actual shell commands. I'd avoided having any real test coverage simply because it felt impossible to try and test tools that needed to leverage
plenary.job
. Sure, I could mock it but it never got close to actual real-life usage.Then I invested the time to understand about child processes. My word...what they have enabled me to do is incredible. In a minimal amount of effort, I can now test the whole execution chain of a user doing a function tool call, then a command tool call and finally a function tool call. No way that was even remotely possible before this:
Beta Was this translation helpful? Give feedback.
All reactions