You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was running the test when I saw some fails in the Open Line tests. After some investigation I found out that it was because I had Tabs set as my indentation. So I fixed the tests so that they pass when Spaces or Tabs are set in the main editor.
I think it would be better to have the unit test force the specific preferences configuration it's expecting. With this change, the tests will test different things on different peoples' computers, which could be very confusing if only one version is failing.
Maybe in general tests that run in the Jasmine window should be isolated from the main Brackets prefs in the same way that tests popping up a separate window are...
@peterflynn Makes sense. I updated the fix by setting the use of spaces and the space units when creating a mock editor, and used constants for all this stuff.
The only question I have is about testing with the different indentation settings. It looks like all tests are now run with indentation set to 4 spaces. Seems like we should have some tests with Tabs and other lengths of spaces. Do we have them somewhere else and I am not seeing them? If not, are they appropriate here? If not, I'm OK with creating an issue so they get done at a later time.
All the tests are only done with 4 spaces indentation (specially now that we set it for that instead of using the editor settings). Open line creates a new lines and uses the CodeMirror APIs to indent it. So not sure if it needs more tests with other indentations, but if it does you can open a new issue for that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
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.
I was running the test when I saw some fails in the Open Line tests. After some investigation I found out that it was because I had Tabs set as my indentation. So I fixed the tests so that they pass when Spaces or Tabs are set in the main editor.