Commit bf1026b
committed
Fix failing unit tests
* This PR caused the Sidebar.test.ts file tests to fail because TransformStream is not found.
* TransformStream exists in the Node version I'm testing with (20), but it still isn't found by Jest
* Turns out it is a problem with Jest, and the workaround is the simple package jest-fixed-jsdom, which subclasses JSDOMEnvironment testing environment, placing this and several other dependencies in its global object.
* In package.json
- add jest-fixed-jsdom as a devDependency
* In jest.config.cjs
- change testEnvironment to jest-fixed-jsdom1 parent 498e49e commit bf1026b
3 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments