Commit 346f7027 authored by Winnie Hellmann's avatar Winnie Hellmann

Add workaround for innerText in Jest

parent 7a7866a5
...@@ -23,3 +23,12 @@ beforeEach(done => { ...@@ -23,3 +23,12 @@ beforeEach(done => {
}); });
Vue.use(Translate); 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;
},
configurable: true, // make it so that it doesn't blow chunks on re-running tests with things like --watch
});
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