Skip to content

Commit 5583e1f

Browse files
author
Jiří Fencl
committed
Fix File class override in jsdom tests
1 parent 29a7637 commit 5583e1f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/smooth-ducks-kneel.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@ima/plugin-testing-integration": patch
3+
---
4+
5+
Fix File class override in jsdom tests
6+
7+
- **What?** Fix File class override in jsdom tests
8+
- **Why?** Use correct global File class in jsdom
9+
- **How?** Nothing.

packages/plugin-testing-integration/src/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ async function initImaApp(bootConfigMethods = {}) {
9090
// we should switch to `global-jsdom`, or take its implementation
9191
// as an inspiration for our own implementation
9292
global.CustomEvent = window.CustomEvent; // Hotfix for Node 19+, we can remove this once we switch to `global-jsdom`
93+
global.File = window.File; // Hotfix for Node 19+, we can remove this once we switch to `global-jsdom`
9394

9495
// set debug before IMA env debug
9596
global.$Debug = true;

0 commit comments

Comments
 (0)