redguardtoo / js-comint

js-comint will send the code from Emacs into node.js or rhino
GNU General Public License v3.0
71 stars 22 forks source link

Add tests for multiline statements, run tests in github workflow #35

Closed saffroy closed 10 months ago

saffroy commented 10 months ago

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.

saffroy commented 10 months ago

Oh and since the unmerged PR doesn't seem to trigger actions, you can check out the result of actions on my fork:

https://github.com/saffroy/js-comint/actions

redguardtoo commented 10 months ago

thanks