@@ -31,7 +31,6 @@ main() {
31
31
module..value (Element , document.body);
32
32
});
33
33
34
- // Not sure why this doesn't work.
35
34
afterEach (() {
36
35
document.body.children.clear ();
37
36
});
@@ -45,7 +44,6 @@ main() {
45
44
document.querySelector ('[on-abc]' ).dispatchEvent (new Event ('abc' ));
46
45
var fooScope = _.getScope (document.querySelector ('[foo]' ));
47
46
expect (fooScope.context['ctrl' ].invoked).toEqual (true );
48
- document.body.children.clear ();
49
47
}));
50
48
51
49
it ('shoud register and handle event with long name' , inject ((TestBed _) {
@@ -57,7 +55,6 @@ main() {
57
55
document.querySelector ('[on-my-new-event]' ).dispatchEvent (new Event ('myNewEvent' ));
58
56
var fooScope = _.getScope (document.querySelector ('[foo]' ));
59
57
expect (fooScope.context['ctrl' ].invoked).toEqual (true );
60
- document.body.children.clear ();
61
58
}));
62
59
63
60
it ('shoud have model updates applied correctly' , inject ((TestBed _) {
@@ -69,7 +66,6 @@ main() {
69
66
el.dispatchEvent (new Event ('abc' ));
70
67
_.rootScope.apply ();
71
68
expect (el.text).toEqual ("new description" );
72
- document.body.children.clear ();
73
69
}));
74
70
75
71
it ('shoud register event when shadow dom is used' , async ((TestBed _) {
@@ -82,7 +78,6 @@ main() {
82
78
span.dispatchEvent (new CustomEvent ('abc' ));
83
79
var ctrl = _.rootScope.context['ctrl' ];
84
80
expect (ctrl.invoked).toEqual (true );
85
- document.body.children.clear ();
86
81
}));
87
82
88
83
it ('shoud handle event within content only once' , async (inject ((TestBed _) {
@@ -102,7 +97,6 @@ main() {
102
97
103
98
var fooScope = _.getScope (document.querySelector ('[foo]' ));
104
99
expect (fooScope.context['ctrl' ].invoked).toEqual (true );
105
- document.body.children.clear ();
106
100
})));
107
101
});
108
102
}
0 commit comments