swirl icon indicating copy to clipboard operation
swirl copied to clipboard

Improve the testability of Swirl

Open drfloob opened this issue 8 years ago • 0 comments

RE: #516

I didn't find a clean way to implement a simple test for the crashing "REPL" command reset. As far as I can tell, the test would require an active swirl session, and catching an error thrown from within the task callback handler. No existing tests do either of those.

It may be worth refactoring a bit for testability. Naively, I think we may get some mileage out of adding the callback at the R-level instead of the C-level via taskCallbackManager, and either accessing the environment of the callback directly, or maybe using the manager's evaluate method. I haven't played with this implementation yet, though, so I'm not sure it'd work. I hope to report back tomorrow.

Anyone care to discuss? Are there any other testing concerns or related refactoring projects going on right now?

drfloob avatar Jul 29 '16 01:07 drfloob