@@ -189,6 +189,12 @@ define(function (require, exports, module) {
189189 //waits(1000);
190190
191191 // revert files to original content with offset markup
192+ initInlineTest = null ;
193+ testWindow = null ;
194+ EditorManager = null ;
195+ CommandManager = null ;
196+ FileIndexManager = null ;
197+ JSUtils = null ;
192198 SpecRunnerUtils . closeTestWindow ( ) ;
193199 } ) ;
194200
@@ -386,15 +392,20 @@ define(function (require, exports, module) {
386392 JSCodeHints = extensionRequire ( "main" ) ;
387393 }
388394
395+ beforeEach ( function ( ) {
396+ initInlineTest ( "test.html" ) ;
397+ initJSCodeHints ( ) ;
398+ } ) ;
399+
400+ afterEach ( function ( ) {
401+ JSCodeHints = null ;
402+ } ) ;
389403
390404 it ( "should see code hint lists in quick editor" , function ( ) {
391405 var start = { line : 13 , ch : 11 } ,
392406 testPos = { line : 5 , ch : 29 } ,
393407 testEditor ;
394408
395- initInlineTest ( "test.html" ) ;
396- initJSCodeHints ( ) ;
397-
398409 runs ( function ( ) {
399410 var openQuickEditor = SpecRunnerUtils . toggleQuickEditAtOffset ( EditorManager . getCurrentFullEditor ( ) , start ) ;
400411 waitsForDone ( openQuickEditor , "Open quick editor" ) ;
@@ -416,9 +427,6 @@ define(function (require, exports, module) {
416427 jumpPos = { line : 3 , ch : 6 } ,
417428 testEditor ;
418429
419- initInlineTest ( "test.html" ) ;
420- initJSCodeHints ( ) ;
421-
422430 runs ( function ( ) {
423431 var openQuickEditor = SpecRunnerUtils . toggleQuickEditAtOffset ( EditorManager . getCurrentFullEditor ( ) , start ) ;
424432 waitsForDone ( openQuickEditor , "Open quick editor" ) ;
@@ -445,9 +453,6 @@ define(function (require, exports, module) {
445453 jumpPos = { line : 9 , ch : 21 } ,
446454 testEditor ;
447455
448- initInlineTest ( "test.html" ) ;
449- initJSCodeHints ( ) ;
450-
451456 runs ( function ( ) {
452457 var openQuickEditor = SpecRunnerUtils . toggleQuickEditAtOffset ( EditorManager . getCurrentFullEditor ( ) , start ) ;
453458 waitsForDone ( openQuickEditor , "Open quick editor" ) ;
@@ -480,6 +485,10 @@ define(function (require, exports, module) {
480485 } ) ;
481486
482487 afterEach ( function ( ) {
488+ testWindow = null ;
489+ CommandManager = null ;
490+ EditorManager = null ;
491+ PerfUtils = null ;
483492 SpecRunnerUtils . closeTestWindow ( ) ;
484493 } ) ;
485494
0 commit comments