-
Notifications
You must be signed in to change notification settings - Fork 82
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
Error/Warning while running lwc-jest tests on a single newly created LWC component. #344
Comments
Can you run It looks like LWC v5.1.0 is being pulled in somehow, whereas |
Also: please try updating to version 3.1.1. |
Hey @nolanlawson realized I had not replied, my bad... What is the expected development flow with sfdx-lwc-jest? Because I saw that you just released v.4.0.0 and it's marked as "latest" on npm, so our tools are trying to update to the latest version. However I see that the v4.0.0 contains a breaking change which updates LWC to v6.0.0? While I seem to read online that the current release of Salesforce Spring '24 is running LWC v5 and not v6. (source: https://github.com/salesforce/lwc/releases/tag/v5.0.0) I believe this may be related to this error because trying to update to v4.0.0 of sfdx-lwc-jest is triggering errors again in the CI like the following:
Shouldn't the releases of sfdx-lwc-jest that are ahead of the current release of Salesforce be tagged with something else than To be clear it doesn't break the tests, but it just looks alarming I guess? |
@erocheleau This is explained in the README for this project:
As mentioned in the README, the expected flow is e.g.:
So if you are targeting the current release (Spring '24), you would use the BTW you can use Yarn resolutions or something if you need to force all LWC versions to be the same. There's also a discussion about overhauling the versioning system here: #349 |
Description
Error/Warning while running lwc-jest tests on a single newly created LWC component.
We didn't do anything specific to make this error appear, just created a new lwc and now we're getting this error.
Doesn't seem to be related to any of the
sfdx-project.json
api version or anything like that.Steps to Reproduce
The component has nothing specific, just a newer component we created.
# Command to repro sfdx-lwc-jest -- --no-cache
Expected Results
Expected not to have to worry about the engine version of a template of a LWC created normally.
And to be able to just run tests.
Actual Results
The tests still run, but this warning is displayed every time.
Version
The text was updated successfully, but these errors were encountered: