Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix - Addons relative path #9454

Closed
wants to merge 3 commits into from
Closed

Bugfix - Addons relative path #9454

wants to merge 3 commits into from

Conversation

RuneKR
Copy link

@RuneKR RuneKR commented Jan 15, 2020

Issue: #9343

What I did

Editing the presets function to allow local addons to be included in main.js

How to test

Current function is not tested in existing unit tests as the function is only indirectly exposed.
Test the functionality by adding an addon to main.js like the following:

require.resolve('../packages/node_modules/@my/addon/dist/register')

@vercel
Copy link

vercel bot commented Jan 15, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/b3d6936uw
✅ Preview: https://monorepo-git-fork-ords-next.storybook.now.sh

@shilman
Copy link
Member

shilman commented Jan 15, 2020

Thanks @RuneKR! Can you add at least one test to presets.test.js to show how this works?

@RuneKR
Copy link
Author

RuneKR commented Jan 15, 2020

Sure thing! :)

@RuneKR
Copy link
Author

RuneKR commented Jan 15, 2020

Added test - Mocked the files so really only testing if MacOS is supported. I could create actual mock files, but that would then just test the OS on which the test is run anyway. Looked at current code and this example for my tests: 'https://jestjs.io/docs/en/manual-mocks'

@shilman
Copy link
Member

shilman commented Jan 16, 2020

Closing this in favor of #9485, which I think is a simpler and more correct fix/test. Thanks so much for getting to the bottom of this!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants