Seemingly out-of-date code being run in test pane

This is an old issue, but I think maybe I see what’s causing it:

I was seeing similar behavior, but I don’t think it’s taking a long time to save, it’s just that the order of events is not what you are expecting.

I too have my VS Code configured to auto-save and auto-format upon focus change, so normally I just code-code-code and then hit the testing button.

But I found that when I make a change to a file, then hit the triangle “play” button in the testing pane, the click action happens before the focus change, so the old code is loaded and programmer confusion ensues.

A quick workaround is to train myself to hit Command-S before running tests; equivalently, click anywhere else but the triangle “play” button first, to change focus, then hit the button.

Is it possible to make the button first invoke auto-save (or just perform the focus change) and then do Revise?