Skip to content

Commit

Permalink
Merge pull request #167 from seznam/fix-file-class-override
Browse files Browse the repository at this point in the history
Fix File class override in jsdom tests
  • Loading branch information
crysadrak authored May 20, 2024
2 parents 29a7637 + 5583e1f commit 21b44a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changeset/smooth-ducks-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@ima/plugin-testing-integration": patch
---

Fix File class override in jsdom tests

- **What?** Fix File class override in jsdom tests
- **Why?** Use correct global File class in jsdom
- **How?** Nothing.
1 change: 1 addition & 0 deletions packages/plugin-testing-integration/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async function initImaApp(bootConfigMethods = {}) {
// we should switch to `global-jsdom`, or take its implementation
// as an inspiration for our own implementation
global.CustomEvent = window.CustomEvent; // Hotfix for Node 19+, we can remove this once we switch to `global-jsdom`
global.File = window.File; // Hotfix for Node 19+, we can remove this once we switch to `global-jsdom`

// set debug before IMA env debug
global.$Debug = true;
Expand Down

0 comments on commit 21b44a7

Please sign in to comment.