Skip to content

Commit 16d946e

Browse files
authored
test: Fix invalid test that breaks in zoneless (#28815)
1 parent a249ac8 commit 16d946e

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/cdk/overlay/dispatchers/overlay-keyboard-dispatcher.spec.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {TestBed, inject} from '@angular/core/testing';
2-
import {dispatchKeyboardEvent} from '../../testing/private';
31
import {ESCAPE} from '@angular/cdk/keycodes';
2+
import {ComponentPortal} from '@angular/cdk/portal';
43
import {ApplicationRef, Component} from '@angular/core';
5-
import {OverlayModule, Overlay} from '../index';
4+
import {TestBed, inject} from '@angular/core/testing';
5+
import {dispatchKeyboardEvent} from '../../testing/private';
6+
import {Overlay, OverlayModule} from '../index';
67
import {OverlayKeyboardDispatcher} from './overlay-keyboard-dispatcher';
7-
import {ComponentPortal} from '@angular/cdk/portal';
88

99
describe('OverlayKeyboardDispatcher', () => {
1010
let appRef: ApplicationRef;
@@ -192,11 +192,6 @@ describe('OverlayKeyboardDispatcher', () => {
192192
expect(appRef.tick).toHaveBeenCalledTimes(0);
193193
dispatchKeyboardEvent(document.body, 'keydown', ESCAPE);
194194
expect(appRef.tick).toHaveBeenCalledTimes(0);
195-
196-
overlayRef.keydownEvents().subscribe();
197-
dispatchKeyboardEvent(document.body, 'keydown', ESCAPE);
198-
199-
expect(appRef.tick).toHaveBeenCalledTimes(1);
200195
});
201196
});
202197

tslint.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@
164164
// Tests may need to verify behavior with zones.
165165
"**/*.spec.ts",
166166
// TODO(mmalerba): following files to be cleaned up and removed from this list:
167-
"**/cdk/a11y/focus-trap/focus-trap.ts",
168-
"**/material/tabs/paginated-tab-header.ts"
167+
"**/cdk/a11y/focus-trap/focus-trap.ts"
169168
]
170169
]
171170
},

0 commit comments

Comments
 (0)