Mock away document.createRange()
(cherry picked from commit a0e7e2075c)
This commit is contained in:
parent
9d4450263f
commit
b231329bb9
|
|
@ -38,6 +38,16 @@ class CustomEnvironment extends JSDOMEnvironment {
|
|||
this.global.fixturesBasePath = `${process.cwd()}/${
|
||||
IS_EE ? 'ee/' : ''
|
||||
}spec/javascripts/fixtures`;
|
||||
|
||||
// Not yet supported by JSDOM: https://github.com/jsdom/jsdom/issues/317
|
||||
this.global.document.createRange = () => ({
|
||||
setStart: () => {},
|
||||
setEnd: () => {},
|
||||
commonAncestorContainer: {
|
||||
nodeName: 'BODY',
|
||||
ownerDocument: this.global.document,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async teardown() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue