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

Don't delete nested directories #42

Closed
wants to merge 1 commit into from

Conversation

54M5M17H
Copy link

Problem

Take test cases stuctured in the following way

TestSomeFunctionality

  • SubTestA
    • SubSubTestX
    • SubSubTestY
  • SubTestB

When SubTestB is updated, it will delete the TestSomeFunctionality/ directory. That means the next time we run SubTestA it will have no Goldie files.

Solution

Only delete the files in the current test folder, not the nested subdirectories. This preserves nested test sub-cases.

*Problem*

Take test cases stuctured in the following way

TestSomeFunctionality
- SubTestA
	- SubSubTestX
	- SubSubTestY
- SubTestB

When SubTestB is updated, it will delete the `TestSomeFunctionality/`
directory. That means the next time we run SubTestA it will have no
Goldie files.

*Solution*
Only delete the files in the current test folder, not the nested
subdirectories. This preserves nested test sub-cases.
Copy link

@nestorowicz nestorowicz left a comment

Choose a reason for hiding this comment

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

Looks good, I just want to make sure we have a way of cleaning up unused test files. Is this still possible in any way?

@54M5M17H
Copy link
Author

Looks good, I just want to make sure we have a way of cleaning up unused test files. Is this still possible in any way?

That's something I need to think about. My opinion is that cleaning should be done upfront, at the top level, before running any tests. Not sure if there's a mechanism for this currently though.

@sebdah
Copy link
Owner

sebdah commented Aug 2, 2024

Closed by #43

@sebdah sebdah closed this Aug 2, 2024
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