| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
( function ( QUnit ) { |
| 10 |
const origModule = QUnit.module; |
| 11 |
|
| 12 |
QUnit.dump.maxDepth = 10; |
| 13 |
|
| 14 |
QUnit.module = function ( name, localEnv ) { |
| 15 |
localEnv = localEnv || {}; |
| 16 |
origModule( name, { |
| 17 |
beforeEach: function () { |
| 18 |
this.fixture = document.createElement( 'div' ); |
| 19 |
this.fixture.id = 'qunit-fixture'; |
| 20 |
document.body.appendChild( this.fixture ); |
| 21 |
|
| 22 |
this.fixture.appendChild( ve.init.target.$element[ 0 ] ); |
| 23 |
|
| 24 |
if ( localEnv.beforeEach ) { |
| 25 |
return localEnv.beforeEach.apply( this, arguments ); |
| 26 |
} |
| 27 |
}, |
| 28 |
afterEach: function () { |
| 29 |
let res; |
| 30 |
if ( localEnv.afterEach ) { |
| 31 |
res = localEnv.afterEach.apply( this, arguments ); |
| 32 |
} |
| 33 |
|
| 34 |
this.fixture.parentNode.removeChild( this.fixture ); |
| 35 |
return res; |
| 36 |
} |
| 37 |
} ); |
| 38 |
}; |
| 39 |
}( QUnit ) ); |