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

pkp/pkp-lib#9527 Update msw-storybook-addon, test whether works with … #319

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ const pinia = createPinia();

// Initialize MSW
initialize({
onUnhandledRequest: 'bypass',
/** To be migrated to msw2 if neede */
/*onUnhandledRequest: ({method, url}) => {
if (url.pathname.includes('://mock/')) {
console.error(`Unhandled ${method} request to ${url}.
onUnhandledRequest: (request) => {
if (request.url.includes('://mock/')) {
console.error(`Unhandled ${request.method} request to ${request.url}.

This exception has been only logged in the console, however, it's strongly recommended to resolve this error as you don't want unmocked data in Storybook stories.

If you wish to mock an error response, please refer to this guide: https://mswjs.io/docs/recipes/mocking-error-responses
`);
}
},*/
},
});

setup((app) => {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"less": "^4.2.0",
"lint-staged": "^14.0.1",
"msw": "^2.0.11",
"msw-storybook-addon": "^2.0.0--canary.122.b3ed3b1.0",
"msw-storybook-addon": "^2.0.0-beta.1",
"postcss": "^8.4.27",
"prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.5.11",
Expand Down