This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think deleting the entire temp folder after every spec could cause problems? I know that the LowLevelFileIO tests do this, but now (for performance) we keep Brackets window open across multiple specs, so that seems like it could lead to using a temp file across multiple specs.
Maybe
removeTempDirectory()should take a subfolder parameter so it could append this to temp folder path and only delete a subfolder inside the temp folder.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't cause problems. Each suite should be cleaning up after itself and not have suite-to-suite dependencies like that anyhow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpecRunner doesn't wait until 1 suite is done before starting the next suite -- the specs are intermingled -- so 1 suite can delete files being used by another suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about that? That would seem to violate the expectations of beforeEach/afterEach. I don't think I've ever seen that behavior.
Regardless, I understand your concern about the overreach. I'll use
deletePathinstead...still goes throughbrackets.fsinstead of node. Fix pushed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right -- what I said does not seem to be true. SpecRunner always seemed like it was running things in any order, but watching it more closely, it seems to run only 1 suite at a time.