I notices that I get an error when I change my calculator-test-utils.js file to handle an optional theme parameter. If I specify the theme, everything works fine but it I omit it, I get this "Cannot read properties of undefined (reading 'theme')" error, which I also saw on your screen.
I tried a few things and finally found this solution but I am not sure if it breaks the options object in general if only the theme parameter is left undefined.
Hey Kent,
I notices that I get an error when I change my calculator-test-utils.js file to handle an optional theme parameter. If I specify the theme, everything works fine but it I omit it, I get this "Cannot read properties of undefined (reading 'theme')" error, which I also saw on your screen.
link to the lesson (10 min, 4 sec): https://testingjavascript.com/lessons/jest-support-a-test-utilities-file-with-jest-moduledirectories
I tried a few things and finally found this solution but I am not sure if it breaks the options object in general if only the theme parameter is left undefined.
detailed view