-
Notifications
You must be signed in to change notification settings - Fork 2k
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
FSE: Fix JS unit tests #39326
FSE: Fix JS unit tests #39326
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
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 is generally looking good 👍 Just left a couple of comments
You can see the passing tests in CircleCi by following the link
I guess this applies to some other PR? I didn't see these tests being run by CircleCI in this one.
@tyxla Nice to see you again! :) You can see the tests in this test suite: |
This way, everything can be consistent within the plugin
- Make it work better in the monoreo environment - Move to bin folder
- Use test:* for test commands - Move config to bin/folder
See https://github.com/Automattic/wp-calypso/pull/39120/files In the above PR, the title was removed from the template selector. Apparently, the tests were not correctly executing until now, so the tests nedeed an update to stop referencing that title. Additionally, one snapshot nedeed updated. I guess the current test config in prod is not working correctly.
Co-Authored-By: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
27a16e5
to
b73bb5a
Compare
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.
Verified that the tests pass both locally and on CircleCI for this PR.
LGTM!
Note: this PR was split from #39000
This PR makes JS unit tests more consistent (in preparation for also having e2e and phpunit tests.) It also fixes several issues with the test suite.
Changes proposed in this Pull Request
.test.js
for easier detection (and to be consestent with .spec.js e2e tests)bin/
JS unit and UI tests
The unit test command automatically runs test files that:
apps/full-site-editing
.test.js
(or .ts, .tsx, jsx)To run JS unit/component/ui tests:
npx lerna run test:js --scope='@automattic/full-site-editing' --stream
Testing instructions
npx lerna run test:js --scope='@automattic/full-site-editing' --stream --no-prefix
on the CLI and the tests should pass.