-
Notifications
You must be signed in to change notification settings - Fork 353
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report
Summary
src/index.test.js fails to run on the develop branch and has been broken before any recent changes. This is a pre-existing issue unrelated to any feature work.
Steps to Reproduce
cd packages/react
npx jest src/index.test.js --no-coverage
Cannot find module 'swiper/element/bundle' from 'src/views/ImageGallery/Swiper.js'
Require stack:
src/views/ImageGallery/Swiper.js
src/views/ImageGallery/ImageGallery.js
src/views/AttachmentHandler/ImageAttachment.js
src/views/AttachmentHandler/Attachment.js
src/views/AttachmentHandler/Attachments.js
src/views/AttachmentHandler/index.js
src/views/Message/Message.js
src/views/MessageAggregators/common/MessageAggregator.js
src/views/MessageAggregators/MentionedMessages.js
src/index.test.js
Root Cause
swiper/element/bundle is not installed in [node_modules](vscode-file://vscode-app/c:/Users/vigne/AppData/Local/Programs/Microsoft%20VS%20Code/61b3d0ab13/resources/app/out/vs/code/electron-browser/workbench/workbench.html) at test time, so Jest cannot resolve it when loading the full component tree through src/index.js. There is also no jest.config.js or moduleNameMapper stub to mock it out during tests.
Expected Behaviour
npx jest --no-coverage should pass without failing due to a missing or unresolvable package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working