@@ -32,7 +32,7 @@ beforeAll(async () => {
32
32
fn ( type , listener , options ) ;
33
33
}
34
34
35
- // Add to default key arry to prevent removal during reset
35
+ // Add to default key array to prevent removal during reset
36
36
sideEffects [ obj ] . keys . push ( 'addEventListener' ) ;
37
37
38
38
// Replace addEventListener with mock
@@ -41,16 +41,16 @@ beforeAll(async () => {
41
41
} ) ;
42
42
43
43
// Reset JSDOM. This attempts to remove side effects from tests, however it does
44
- // not reset all changes made to globals like the the window and document
44
+ // not reset all changes made to globals like the window and document
45
45
// objects. Tests requiring a full JSDOM reset should be stored in separate
46
- // files, which is only way to do a complete reset of JSDOM with Jest.
46
+ // files, which is only way to do a complete JSDOM reset with Jest.
47
47
beforeEach ( async ( ) => {
48
48
const rootElm = document . documentElement ;
49
49
50
50
// Remove attributes on root element
51
51
[ ...rootElm . attributes ] . forEach ( attr => rootElm . removeAttribute ( attr . name ) ) ;
52
52
53
- // Remove elements (faster the setting innerHTML)
53
+ // Remove elements (faster than setting innerHTML)
54
54
while ( rootElm . firstChild ) {
55
55
rootElm . removeChild ( rootElm . firstChild ) ;
56
56
}
@@ -74,7 +74,7 @@ beforeEach(async () => {
74
74
} ) ;
75
75
76
76
// Restore base elements
77
- rootElm . innerHTML = '<html>< head></head><body></body></html >' ;
77
+ rootElm . innerHTML = '<head></head><body></body>' ;
78
78
} ) ;
79
79
80
80
afterEach ( async ( ) => {
0 commit comments