-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix(HMS-3373): update msw and frontend-components-config #370
Conversation
* Consider migrating to a more modern test runner if | ||
* you don't want to deal with this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? xD What does this mean? I guess its copied over, but do they mean more modern then Jest, or newer version of Jest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because we use jsdom in jest test env, we can pick a different test environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you, I'll go with what you think is best solution, I was just curious ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This polyfills file is taken from the official msw
migration guide, so let's use it instead of replacing to a different test env :)
@@ -9,7 +9,7 @@ export COMPONENT_NAME="provisioning-frontend" # name of resourceTemplate compon | |||
export IMAGE="quay.io/cloudservices/provisioning-frontend" | |||
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace | |||
export APP_ROOT=$(pwd) | |||
# export NODE_BUILD_VERSION=16 | |||
export NODE_BUILD_VERSION=18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧡 it, I'm not sure why it's not a default version already xD
I've just realized we'll need to add the same variable in the .rhcicd/build_deploy.sh
to build main branch with the same version.
ee64548
to
eeb6938
Compare
eeb6938
to
5dbdeab
Compare
5dbdeab
to
40b4a3f
Compare
"npm-run-all": "4.1.5", | ||
"prop-types": "15.8.1", | ||
"stylelint": "13.13.1", | ||
"stylelint-config-recommended-scss": "4.3.0", | ||
"stylelint-scss": "3.21.0", | ||
"ts-patch": "^3.1.1", | ||
"typescript": "^5.3.3", | ||
"undici": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be pin to version 5.x, there's an issue with axios and msw - mswjs/msw#1915
tests seem to run faster :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🧡 Great work @amirfefer, thank you ! 🎉
WIP
This PR update
msw
mocking server worker, which is used in our tests.The msw (1.x -> 2.x) update is required for updating
@redhat-cloud-services/frontend-components-config
due to typescript peer dependent.