FWIW, I don't think this will do exactly the same thing each time.  For example, the first time requiring ./frame in setupTestBlockly will actually load frame.js.  Subsequent times, it will use the cached version of frame.js.  This is quite likely fine for your test cases, but wanted to be sure I called this out.