@@ -1380,8 +1380,9 @@ describe("MinimapElement", () => {
13801380 // ###### ####### ## ## ## #### ######
13811381
13821382 describe ( "when the atom styles are changed" , ( ) => {
1383- let styleElement ;
1383+ let styleElement , DEBOUNCE_TIMEOUT ;
13841384 beforeEach ( ( ) => {
1385+ DEBOUNCE_TIMEOUT = 300 ;
13851386 styleElement = document . createElement ( "style" ) ;
13861387 atom . styles . addStyleElement ( styleElement ) ;
13871388
@@ -1399,6 +1400,7 @@ describe("MinimapElement", () => {
13991400 it ( "forces a refresh with theme change" , ( ) => {
14001401
14011402 atom . themes . emitter . emit ( "did-change-active-themes" )
1403+ advanceClock ( DEBOUNCE_TIMEOUT ) ;
14021404
14031405 waitsFor ( "minimap frame requested" , ( ) => {
14041406 return minimapElement . frameRequested
@@ -1412,6 +1414,7 @@ describe("MinimapElement", () => {
14121414
14131415 it ( "forces a refresh with style update" , ( ) => {
14141416 atom . styles . emitter . emit ( "did-update-style-element" , styleElement )
1417+ advanceClock ( DEBOUNCE_TIMEOUT ) ;
14151418
14161419 waitsFor ( "minimap frame requested" , ( ) => {
14171420 return minimapElement . frameRequested
@@ -1426,6 +1429,7 @@ describe("MinimapElement", () => {
14261429 it ( "forces a refresh with style add" , ( ) => {
14271430
14281431 atom . styles . emitter . emit ( "did-add-style-element" , styleElement )
1432+ advanceClock ( DEBOUNCE_TIMEOUT ) ;
14291433
14301434 waitsFor ( "minimap frame requested" , ( ) => {
14311435 return minimapElement . frameRequested
@@ -1440,6 +1444,7 @@ describe("MinimapElement", () => {
14401444 it ( "forces a refresh with style remove" , ( ) => {
14411445
14421446 atom . styles . emitter . emit ( "did-remove-style-element" , styleElement )
1447+ advanceClock ( DEBOUNCE_TIMEOUT ) ;
14431448
14441449 waitsFor ( "minimap frame requested" , ( ) => {
14451450 return minimapElement . frameRequested
0 commit comments