Skip to content

Commit 330a35d

Browse files
GretaDst3iny
authored andcommitted
fix(deps): bump @nextcloud/vue to ^8.30.0
And polyfill structuredClone() to make jest tests work. Signed-off-by: greta <[email protected]> Signed-off-by: Richard Steinmetz <[email protected]>
1 parent 79b9163 commit 330a35d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
module.exports = {
66
preset: 'ts-jest',
7-
testEnvironment: 'jest-environment-jsdom',
7+
testEnvironment: './src/tests/jsdom-structured-clone-env.js',
88
moduleFileExtensions: [
99
'js',
1010
'jsx',
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import JSDOMEnvironment from 'jest-environment-jsdom'
2+
3+
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
4+
5+
constructor(...args) {
6+
super(...args)
7+
8+
// Fix missing support for structuredClone() in jsdom
9+
// Ref https://github.com/jsdom/jsdom/issues/3363
10+
this.global.structuredClone = structuredClone
11+
}
12+
}

0 commit comments

Comments
 (0)