A comment not blocking this PR: I think for tests like that we should have a lightweight way of instantiating macro context and turn this test into a unit test. It already is unit test just using framework (partest) for functional tests.

The benefit is as usual: instead of having tests that takes 5s to run we would have test that takes 50ms to run and it's easier to debug in the IDE.