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

Add tests for color.is-legacy() #1842

Merged
merged 13 commits into from
Dec 14, 2022
Merged

Conversation

SondraE
Copy link
Contributor

@SondraE SondraE commented Nov 23, 2022

Part of tests for color spaces.
See sass/sass#2831

@SondraE SondraE changed the title Add tests for Color is Legacy Add tests for color.is-legacy() Nov 23, 2022
@nex3 nex3 self-requested a review November 28, 2022 21:43
@nex3
Copy link
Contributor

nex3 commented Nov 28, 2022

We should target these color space PRs to separate branch (color-4 would match the branch name in the Dart Sass repo). If we land them on main, it'll break our CI since the actual implementation of the behavior in question isn't finished yet.

@dvdherron
Copy link
Contributor

We should target these color space PRs to separate branch (color-4 would match the branch name in the Dart Sass repo). If we land them on main, it'll break our CI since the actual implementation of the behavior in question isn't finished yet.

@nex3 I don't think we have the right access here to make a new branch. If you create the branch I can re-target these color PRs.

@nex3
Copy link
Contributor

nex3 commented Dec 1, 2022

@dvdherron Done 😃. I ended up naming it feature.color-4 so that the CI will run on it

@SondraE You should be able to fix the lint errors by running npm run lint-spec -- --fix. I'm not sure why the Dart Sass tests are running, but they may go away if you run the tests again now that you have [skip dart-sass].

@SondraE SondraE changed the base branch from main to feature.color-4 December 1, 2022 20:19
@SondraE SondraE requested a review from nex3 December 6, 2022 17:12
================================================================================
<===> error/too_few_args/input.scss
@use "sass:color";
a {b: color.is-legacy(rgb(0 255))}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is passing too few args to rgb(), but it should be passing too few args to is-legacy()

================================================================================
<===> named/input.scss
@use "sass:color";
a {b: color.is-legacy($color: midnightblue)}
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is testing both a named argument and a named color—we should have separate tests for each of these cases (see https://github.com/sass/sass-spec/blob/main/STYLE_GUIDE.md#do-test-only-one-thing-per-spec)

@nex3
Copy link
Contributor

nex3 commented Dec 13, 2022

Removing [skip dart-sass] since I don't think this will require any code changes in Dart Sass

@nex3
Copy link
Contributor

nex3 commented Dec 13, 2022

JS API test failures are unrelated, I'm working on fixing them in #1853

@nex3 nex3 merged commit 717b64d into sass:feature.color-4 Dec 14, 2022
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.

4 participants