diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 21:07:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 21:07:48 +0300 |
commit | e72386771751fb22245bc6604fef236a2ee130cb (patch) | |
tree | 7cf54bca933159cb177d3caa2f139f87d6d30391 /spec/frontend/helpers/dom_shims/inner_text.js | |
parent | c2b98d3dbd47ab92c79c702276fe9130d9a28036 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/helpers/dom_shims/inner_text.js')
-rw-r--r-- | spec/frontend/helpers/dom_shims/inner_text.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/helpers/dom_shims/inner_text.js b/spec/frontend/helpers/dom_shims/inner_text.js new file mode 100644 index 00000000000..2b8201eed31 --- /dev/null +++ b/spec/frontend/helpers/dom_shims/inner_text.js @@ -0,0 +1,11 @@ +// 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 +}); |