Skip to content

cli: remove .spec from ts files#441

Merged
armaniferrante merged 2 commits into
otter-sec:masterfrom
fanatid:cli-remove-spec-suffix
Jun 30, 2021
Merged

cli: remove .spec from ts files#441
armaniferrante merged 2 commits into
otter-sec:masterfrom
fanatid:cli-remove-spec-suffix

Conversation

@fanatid

@fanatid fanatid commented Jun 30, 2021

Copy link
Copy Markdown
Contributor

I can be wrong, but can somebody explain to me why .spec required for TypeScript files?

@armaniferrante

armaniferrante commented Jun 30, 2021

Copy link
Copy Markdown
Contributor

The only reason it would be useful is if the testing framework needed to differentiate test files from regular modules. If this isn't the case, then removing is fine with me.

@fanatid

fanatid commented Jun 30, 2021

Copy link
Copy Markdown
Contributor Author

I'm not an expert in JS tests frameworks but as I understand *.spec.ts / *.test.ts / etc located with the source file which they test. tests directory do not need files with spec/test suffixes. Also, if we do not use TS, any js will be tested while with TS only *.spec.ts -- this does not look equal 🤔

@armaniferrante armaniferrante merged commit 94f08cd into otter-sec:master Jun 30, 2021
@fanatid fanatid deleted the cli-remove-spec-suffix branch June 30, 2021 18:01
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants