atom / snippets

Atom snippets package
MIT License
205 stars 101 forks source link

Decouple core indentation logic from spec #295

Open Ingramz opened 4 years ago

Ingramz commented 4 years ago

Description of the Change

This pull request changes a test in spec suite which at the time of writing expects a very specfic indentation logic behavior from core: it assumes that when text is selected, hitting Tab always results in indenting the line. The aim of the pull request is somewhat to loosen the test to allow any core behavior (within reason) to occur, while retaining the constraints that make sense for this package.

Alternate Designs

None considered for now.

Benefits

The test is not as tightly coupled to the core, allowing core to change behavior without the need to update this spec.

Possible Drawbacks

There could be future developments which may pass with the new test, but that did not pass with the old one, however this should be unlikely due to the amount of similar tests which possibly catch such cases.

Applicable Issues

atom/atom#20137