Consolidate after-test hooks in serve.test.js