Fix extensions unit test failures showing up in JS Code Hints

Replace the code that is unnecessarily doing the actual opening/closing of test files with a simpler one. The original code is copied from JS Code Hints unit test and has a wait of 10s for each file opening. I think this unnecessary wait somehow is causing the very first JS Code Hints unit test to fail.

This fixes issue #5099.