After I found out that I accidentally broke the code in #33, I thought that it would have been nice to have tests, and even nicer for the maintainer to have them run automatically, so here goes.
Note, I am not very fond of the sleep (sit-for) statements in the tests. I suppose this is essentially caused by comint making things essentially asynchronous, in which case this could probably be fixed by properly waiting for the JS prompt to reappear. I don't know yet how to do that, but I thought there is already enough material for a PR, even if only to discuss.
After I found out that I accidentally broke the code in #33, I thought that it would have been nice to have tests, and even nicer for the maintainer to have them run automatically, so here goes.
Note, I am not very fond of the sleep (
sit-for
) statements in the tests. I suppose this is essentially caused by comint making things essentially asynchronous, in which case this could probably be fixed by properly waiting for the JS prompt to reappear. I don't know yet how to do that, but I thought there is already enough material for a PR, even if only to discuss.