cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Force tab size on test run

Open Will-Sommers opened this issue 3 years ago • 5 comments

  • This fixes test failures related to different local configurations
  • Tests expect tabSize to be 4

Fixes: https://github.com/cursorless-dev/cursorless/issues/598

Checklist

  • N/A - I have added tests

Will-Sommers avatar Jun 03 '22 17:06 Will-Sommers

This will only force tab size to be for when re-running the tests. I think we need to add the same to the test recorder otherwise every test will be recorded with the user tab setting, but run with a fixed setting.

AndreasArvidsson avatar Jun 05 '22 08:06 AndreasArvidsson

This will only force tab size to be for when re-running the tests. I think we need to add the same to the test recorder otherwise every test will be recorded with the user tab setting, but run with a fixed setting.

I'll second what @AndreasArvidsson says here. I think if we detect that the extension is running in debug mode, we should make the same tabSize change

pokey avatar Jun 08 '22 12:06 pokey

Not important, but I'm still a little curious about why this didn't break for me, with other tests that I've recorded.

@pokey — I'll likely add the setting here as well rather than in the actual extension.

https://github.com/cursorless-dev/cursorless/blob/main/src/test/suite/recorded.test.ts#L74-L78

Will-Sommers avatar Jun 08 '22 13:06 Will-Sommers

Not important, but I'm still a little curious about why this didn't break for me, with other tests that I've recorded.

did you record tests that include snippet wrapping? I think those are the ones that will break

@pokey — I'll likely add the setting here as well rather than in the actual extension.

https://github.com/cursorless-dev/cursorless/blob/main/src/test/suite/recorded.test.ts#L74-L78

Sorry not sure I follow—that won't impact recording right?

pokey avatar Jun 08 '22 13:06 pokey

did you record tests that include snippet wrapping? I think those are the ones that will break

Nope, you're right. One other indent and fold test broke as well though

Sorry not sure I follow—that won't impact recording right?

Multi-tasking between emails, sorry. You're right.

Will-Sommers avatar Jun 08 '22 14:06 Will-Sommers

@pokey I think you can have a look at this one now

AndreasArvidsson avatar Oct 24 '22 14:10 AndreasArvidsson