Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add __tests__ to test file detection defaults #24443

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

marvinhagemeister
Copy link
Contributor

The jest test runner popularized putting tests into a __tests__ folder. Whilst many have switched to going with a .test suffix in the file name these days, there are still many jest projects that have __tests__. By adding this to the default test detection logic it makes deno test discover those out of the box.

@bartlomieju bartlomieju added this to the 1.45 milestone Jul 5, 2024
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one small fix:

cli/tools/test/mod.rs Outdated Show resolved Hide resolved
@marvinhagemeister marvinhagemeister merged commit 1e97f0f into main Jul 8, 2024
17 checks passed
@marvinhagemeister marvinhagemeister deleted the __tests__-default branch July 8, 2024 13:20
zebreus pushed a commit to zebreus/deno that referenced this pull request Jul 8, 2024
The `jest` test runner popularized putting tests into a `__tests__`
folder. Whilst many have switched to going with a `.test` suffix in the
file name these days, there are still many jest projects that have
`__tests__`. By adding this to the default test detection logic it makes
`deno test` discover those out of the box.
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