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

test: add test (shouldn't overflow when coloring already colored large text) #74

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

Henry-Hong
Copy link
Contributor

@Henry-Hong Henry-Hong commented Jul 21, 2024

Description

Thanks to above PR, there's no more call stack overflow when coloring already colored long string.

I added some tests to compensate a bit.

I wanted to add tests to the Vite project, but it was pretty tricky, so I made a PR here.

Following's related PR on Vite project.

As-Is (Test fail)

image

To-Be (Test success)

image

tests/test.js Outdated
try {
pc.blue(pc.red("x").repeat(10000))
assert(true)
} catch {
Copy link
Owner

Choose a reason for hiding this comment

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

Omitting (error) only works in newer Node.js versions. Could you please add (error) so the rest of pipelines would go green? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops!
Didn't check the CI tests.
Thank you!

Now everything is green :)

…e text)

- add error statements in case of lower node version
@alexeyraspopov alexeyraspopov merged commit 6f60111 into alexeyraspopov:main Aug 1, 2024
7 of 8 checks passed
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