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

Update tests for strict function unit deprecations #1830

Merged
merged 5 commits into from
Oct 28, 2022
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Oct 28, 2022

See #1813
See sass/sass#3374

[skip dart-sass]

Copy link
Member

@Goodwine Goodwine left a comment

Choose a reason for hiding this comment

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

Can you also add a test that would assert the behavior of a number having multiple numerators and denominators?

spec/core_functions/color/mix.hrx Outdated Show resolved Hide resolved
spec/core_functions/color/mix.hrx Outdated Show resolved Hide resolved
spec/core_functions/color/mix.hrx Show resolved Hide resolved
@@ -349,6 +391,16 @@ Error: argument `$weight` of `mix($color1, $color2, $weight: 50%)` must be a num
a {b: mix(red, blue, -0.001)}

<===> error/bounds/too_low/error
DEPRECATION WARNING: $weight: Passing a number without unit % (-0.001) is deprecated.
Copy link
Member

Choose a reason for hiding this comment

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

The deprecation warning was already part of the tests above, is testing both warning + error intentional? If not, then I think it's better to add units so we don't emit both

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good catch

@nex3 nex3 requested a review from Goodwine October 28, 2022 03:09
@nex3 nex3 merged commit 40aa2b3 into main Oct 28, 2022
@nex3 nex3 deleted the function-units branch October 28, 2022 20:07
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.

2 participants