I've implemented Maxime's solution for this question about "window.matchMedia" not being found, but when I run my test I get this error: TypeError: j.window.MatchMedia is not a function
.
I'm not sure what I need to do to get the "j" to resolve, since if I alter the first line from
Object.defineProperties(window, "matchMedia" {
to
Object.defineProperties(j.window, "matchMedia" {
Jest tells me that it can't resolve "j", which makes sense but doesn't help me understand and fix the error.