giginet / swift-testing-revolutionary

A tool converts test cases written in XCTest to swift-testing
MIT License
200 stars 2 forks source link

Allow removal of other prefixes (i.e. 'test_') as part of the run #7

Closed maartene closed 4 months ago

maartene commented 4 months ago

Hi,

I tend to use test_<very wordy test name> to prefix XCTest tests. Running the tool leads to all my test now being called: @Test _<testname>

Scherm­afbeelding 2024-07-18 om 10 25 58

Would be nice if there was an option to get rid of that first underscore while running the tool. Or perhaps pass in a prefix to remove?

Note: this is a minor issue. Manually getting rid of the underscores isn't a lot of work.

KR Maarten

giginet commented 4 months ago

Your point makes sense. This tool assumes that test methods are named in camelCase; you may want to consider addressing snakecase as well. For now, it makes sense to apply a special conversion to naming with `test` prefix.

I'll support this.

psbss commented 4 months ago

I was just thinking the same thing, thank you.

giginet commented 4 months ago

This feature was available since 0.3.0🎉