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

Port parse tests #427

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Port parse tests #427

merged 2 commits into from
Feb 12, 2024

Conversation

lloydk
Copy link
Collaborator

@lloydk lloydk commented Feb 12, 2024

Closes #393

Shoutout to Github Copilot!

Copy link

netlify bot commented Feb 12, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit eeab77e
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/65ca6e0f213e9c00098ad6b2
😎 Deploy Preview https://deploy-preview-427--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

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

Hey, thanks so much! Yes, Copilot was a LIFESAVER when porting these.
See a few comments, but none of them are blockers.

test/parse.js Outdated Show resolved Hide resolved
name: "hsl()",
tests: [
{
name: "hsl(), commas",
Copy link
Member

Choose a reason for hiding this comment

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

Does the output not show the parent name before the child name or in a way that implies containment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does, the function portion of the name is redundant

expect: '{"spaceId":"hsl","coords":[90,0,0],"alpha":0.5}'
},
{
name: "hsla(), rad for hue, spaces and slash",
Copy link
Member

Choose a reason for hiding this comment

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

This (and some of the ones after) mention hsla() but use hsl(), is that what the original tests did?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's what the original tests did.

@lloydk
Copy link
Collaborator Author

lloydk commented Feb 12, 2024

I'm going to leave the redundant/incorrect hsl functions in the test names for now.

I don't think hsl is spec compliant so I'll open a new issue for that (#428). The tests can be corrected as part of dealing with that issue.

@lloydk lloydk merged commit 605d601 into color-js:main Feb 12, 2024
4 checks passed
@lloydk lloydk deleted the parse-test branch March 15, 2024 05:24
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.

[chore] Port Parsing tests to the new test format
2 participants