You shouldn't need to delete the file since createSmallRepo creates a brand new repo each time, and if you do need it for some reason you probably want to put the }); at the end of this method so that the rest of the code doesn't execute before it's deleted