Commit c723b3f8 authored by Paul Slaughter's avatar Paul Slaughter

Move Jest shim for Element.innerText to dom_shims

**Why?**
This helps clean up our test_setup
https://gitlab.com/gitlab-org/gitlab/issues/33139
parent 264efb4d
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