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

fix: Fixed output tests that failed on some terminals #799

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

christerswahn
Copy link
Contributor

Description

Several of the existing test cases failed locally due to inconsistent terminal width logic. This problem surfaced when run on a Mac, using iTerm2 and Bash 5, with a terminal width greater than 80. Some tests, but not all, were hardcoded with output that was 80 wide.

This change makes all the tests consistently use dynamic terminal width in output comparison.

It might be argued that Melos shouldn't write dashed lines longer than 80 anyway, but that's an output design question and beyond the scope of this narrow fix.

Also reinstated two output-checking tests that were skipped since they were sensitive to processing time differences. This was done by simply using regexps for the varying time.

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • [ x] 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

Sorry, something went wrong.

Copy link

docs-page bot commented Dec 6, 2024

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/melos~799

Documentation is deployed and generated using docs.page.

@CLAassistant
Copy link

CLAassistant commented Dec 6, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

I've always been confused about why it was locked to 80 for the tests to begin with, thanks for the improvement!

@spydon spydon merged commit e074cb0 into invertase:main Dec 6, 2024
10 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.

None yet

3 participants