diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js index 006fc60ef57..1edb2450b4c 100644 --- a/spec/frontend/test_setup.js +++ b/spec/frontend/test_setup.js @@ -23,3 +23,12 @@ beforeEach(done => { }); 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 +});