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

tests: add explicit small-icu detection for i18n #12696

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Conversation

brendankenny
Copy link
Member

the node 12 compat checks added to unit tests in #12426 don't work if your Node 12 also happened to be built with full-icu, as @victorporof's seems to have been :)

This adds an explicit check for better-than-small ICU support to the existing node 12 checks. As before, we can remove all this when we move to a Node 14 minimum.

@brendankenny brendankenny requested a review from a team as a code owner June 24, 2021 22:41
@brendankenny brendankenny requested review from patrickhulce and removed request for a team June 24, 2021 22:41
@google-cla google-cla bot added the cla: yes label Jun 24, 2021
function isNode12SmallIcu() {
// COMPAT: Remove when Node 12 is retired and `full-icu` is the default everywhere.
return process.versions.node.startsWith('12') &&
Intl.NumberFormat.supportedLocalesOf('es').length === 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

good enough check. We really only need to know if the host machine is going to fail an i18n test so needs to go onto the easy-mode test instead

@victorporof
Copy link
Contributor

Works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants