test(core): add initial tests
Adds some tests for the core package and fixes a small bug found during
writing them.
The bug is basically that we never unhide the cursor on `process.exit`
conditions, meaning we leave it hidden in the terminal after our prompt
has been cancelled.