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

Fixed unit tests that were broken before 1.13 #749

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

scohen
Copy link
Contributor

@scohen scohen commented Oct 14, 2022

The unit tests on builds prior to 1.13 were failing because I was patching the wrong function. Prior to 1.13, formatter_for_file didn't exist, but the unit tests would patch that but the function_exported? check in source_file.ex would skip that branch and succeed, which would cause the tests to fail.

The change is simple, check to see if formatter_for_file exists, and if it doesn't, patch the formatter_opts_for_file function

The unit tests on builds prior to 1.13 were failing because I was
patching the wrong function. Prior to 1.13, formatter_for_file didn't
exist, but the unit tests would patch that but the
`function_exported?` check in `source_file.ex` would skip that branch
and succeed, which would cause the tests to fail.

The change is simple, check to see if `formatter_for_file` exists, and
if it doesn't, patch the `formatter_opts_for_file` function
@lukaszsamson lukaszsamson merged commit b55fece into elixir-lsp:master Oct 15, 2022
@lukaszsamson
Copy link
Collaborator

Nice @scohen

@scohen scohen deleted the scohen/fix-failing-tests branch November 7, 2022 19:27
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