- setup onClose method to generate coverage.json