Commit e2685e00 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '33139-move-element-innertext-to-dom-shims' into 'master'

Move Jest shim for Element.innerText to dom_shims

Closes #33139

See merge request gitlab-org/gitlab!21850
parents 3c704663 c723b3f8
import './get_client_rects';
import './inner_text';
// 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) {
this.textContext = value;
},
configurable: true, // make it so that it doesn't blow chunks on re-running tests with things like --watch
});
......@@ -34,18 +34,6 @@ Vue.config.productionTip = false;
Vue.use(Translate);
// 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) {
this.textContext = value;
},
configurable: true, // make it so that it doesn't blow chunks on re-running tests with things like --watch
});
// convenience wrapper for migration from Karma
Object.assign(global, {
getJSONFixture,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment