handle new file in karma config, use window load event to launch test