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

fix: update dependencies, including jest #335

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

nolanlawson
Copy link
Contributor

@nolanlawson nolanlawson commented Aug 10, 2023

BREAKING CHANGE: Jest updated from v27 to v28

Fixes #319

Updates all dependencies, including Jest. Users of sfdx-lwc-jest may need to modify their tests to deal with breaking changes in Jest 28 and Jest 29.

@nolanlawson
Copy link
Contributor Author

This should probably be tested on a sample project before merging. I just tried it on a small project and it immediately failed due to an issue with jest-environment-jsdom.

function red(message) {
// equivalent to chalk.red()
return `\x1B[31m${message}\x1B[39m`;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chalk has breaking changes, and we don't need it.

@nolanlawson
Copy link
Contributor Author

OK, I tested lwc-recipes manually, and it works with this PR. (I wanted to avoid issues we saw with #288). The above-mentioned issue with jest-environment-jsdom is also fixed.

I also tested --coverage, and coverage actually works better than before – apparently using .js excludes files that are imported with bare file extensions. In the lwc-recipes repo, --coverage finds many more files than it did previously.

@nolanlawson nolanlawson merged commit a007e2a into master Aug 10, 2023
@nolanlawson nolanlawson deleted the nolan/update-deps-20230810 branch August 10, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Jest 29 and use of new conditional directives support for elements other than template
2 participants