Test programmatically

So we don't have to use different files for each test.
because that won't emit any events, just write directly to `stdin` (which will appear in the CLI) and then exit without any tests being run.