Added window close to fix appendChild error from jsdom dep