0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-31 06:43:12 +00:00
nextcloud_server/__tests__/FixJSDOMEnvironment.ts
skjnldsv 709b05e77d fix(jest): nextcloud/files Node structuredClone
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-12-10 14:38:26 +01:00

14 lines
503 B
TypeScript

import JSDOMEnvironment from 'jest-environment-jsdom'
// https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
super(...args)
// https://github.com/jsdom/jsdom/issues/3363
// 31 ad above switched to vitest and don't have that issue
this.global.structuredClone = structuredClone
}
}