Seems like a good addition to test/util.js