Closed JoshuaKGoldberg closed 6 years ago
Thanks for providing the repo.
This line is your wallaby config:
jestConfig.moduleNameMapper[".*\.css$"] = cssMockFile;
is telling Jest to mock all files that end with css
, so the node_modules/@uifabric/utilities/lib/css.js
file is not loaded correctly and causes the error.
Fixing the pattern as follows should help:
jestConfig.moduleNameMapper["\\.css$"] = cssMockFile;
Such a simple fix. Thanks! :)
Issue description or question
Wallaby.js configuration file
Code editor or IDE name and version
Visual Studio Code v1.19.1
OS name and version
Windows 10 OSX latest
Issue
Office UI Fabric fails a few tests only in Wallaby.js - not the Jest CLI runner.
Content.tsx
:Content.test.tsx
:Actual behavior:
Expected behavior:
Running tests in Wallaby.js shouldn't fail if the Jest CLI doesn't.
https://github.com/JoshuaKGoldberg/wallabyjs-office-ui-fabric-react-bug-repro
Linked to https://github.com/OfficeDev/office-ui-fabric-react/issues/3709