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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor the tests #25

Merged
merged 2 commits into from
Jun 10, 2023
Merged

refactor the tests #25

merged 2 commits into from
Jun 10, 2023

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Jun 10, 2023

cc/ @AucaCoyan

did you know i like refactoring things? 馃槒

in this PR, i propose

  • breaking the multi-line ignore_comments test into multiple lines => this makes the whole structure easier to see imo, e.g. the fact that nufmt adds a trailing whitespace after myfunc(one)

Warning
also we have to keep in mind that nufmt works just fine with invalid nu code, e.g. ignore_comments is not valid nu code 馃

  • renaming nu into input in the tests to test nufmt(input) == expected
  • writing a run_test wrapper that calls nufmt and assert the values

this commit also renames `nu` to `input` to test
    nufmt(input) == expected
@AucaCoyan
Copy link
Contributor

AucaCoyan commented Jun 10, 2023

I love it!
I knew a good refactor was coming for these tests.
Much of the code base is ugly today, but the important part is that it works. Slowly but surely we will refactor it beautifully 馃挴

@amtoine
Copy link
Member Author

amtoine commented Jun 10, 2023

I love it!

cool, i take that for an approval then 馃槉

I knew a good refactor was coming for these tests.

here it comes 馃挭

Much of the code base is ugly today, but the important part is that it works. Slowly but surely we will refactor it beautifully 100

yup agree 馃槍

@amtoine amtoine merged commit 3454d7a into nushell:main Jun 10, 2023
4 checks passed
@amtoine amtoine deleted the refactor/tests branch June 10, 2023 10:59
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

2 participants