serve: refactor the test (tip from @mistydemeo)

no need to capture output as we are not using it