RouterOS scripting is too “simple” (as in… “not good”) for a unit testing framework to be reliably written in it, which in turn means there’s no viable way to internally do such tests.
You could use the API to do that, i.e. run scripts to run, then analyze their output, and use assertions and reports within your language of choice, as opposed to generating them with the router. That’s the best approach today.
I realize resetting the router state is a big problem with the above (and also why unit testing frameworks aren’t a trivial thing to write)… You could create a clean VM, and then clone it before each test session.