Skip to content

Commit 062249d

Browse files
mvuksanomhevery
authored andcommitted
chore(EventHandler): Clean up EventHandler tests
Closes dart-archive#770
1 parent 71b2855 commit 062249d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

test/core_dom/event_handler_spec.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ main() {
3131
module..value(Element, document.body);
3232
});
3333

34-
// Not sure why this doesn't work.
3534
afterEach(() {
3635
document.body.children.clear();
3736
});
@@ -45,7 +44,6 @@ main() {
4544
document.querySelector('[on-abc]').dispatchEvent(new Event('abc'));
4645
var fooScope = _.getScope(document.querySelector('[foo]'));
4746
expect(fooScope.context['ctrl'].invoked).toEqual(true);
48-
document.body.children.clear();
4947
}));
5048

5149
it('shoud register and handle event with long name', inject((TestBed _) {
@@ -57,7 +55,6 @@ main() {
5755
document.querySelector('[on-my-new-event]').dispatchEvent(new Event('myNewEvent'));
5856
var fooScope = _.getScope(document.querySelector('[foo]'));
5957
expect(fooScope.context['ctrl'].invoked).toEqual(true);
60-
document.body.children.clear();
6158
}));
6259

6360
it('shoud have model updates applied correctly', inject((TestBed _) {
@@ -69,7 +66,6 @@ main() {
6966
el.dispatchEvent(new Event('abc'));
7067
_.rootScope.apply();
7168
expect(el.text).toEqual("new description");
72-
document.body.children.clear();
7369
}));
7470

7571
it('shoud register event when shadow dom is used', async((TestBed _) {
@@ -82,7 +78,6 @@ main() {
8278
span.dispatchEvent(new CustomEvent('abc'));
8379
var ctrl = _.rootScope.context['ctrl'];
8480
expect(ctrl.invoked).toEqual(true);
85-
document.body.children.clear();
8681
}));
8782

8883
it('shoud handle event within content only once', async(inject((TestBed _) {
@@ -102,7 +97,6 @@ main() {
10297

10398
var fooScope = _.getScope(document.querySelector('[foo]'));
10499
expect(fooScope.context['ctrl'].invoked).toEqual(true);
105-
document.body.children.clear();
106100
})));
107101
});
108102
}

0 commit comments

Comments
 (0)