2019-12-17 18:07:48 +00:00
|
|
|
// workaround for JSDOM not supporting innerText
|
|
|
|
// see https://github.com/jsdom/jsdom/issues/1245
|
|
|
|
Object.defineProperty(global.Element.prototype, 'innerText', {
|
|
|
|
get() {
|
|
|
|
return this.textContent;
|
|
|
|
},
|
|
|
|
set(value) {
|
2021-06-18 21:10:06 +00:00
|
|
|
this.textContent = value;
|
2019-12-17 18:07:48 +00:00
|
|
|
},
|
|
|
|
configurable: true, // make it so that it doesn't blow chunks on re-running tests with things like --watch
|
|
|
|
});
|