Skip to content

Don't skip tests named *Fourslash.ts #48615

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

Merged
merged 1 commit into from
Apr 11, 2022
Merged

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Apr 8, 2022

I noticed that I can't run the following tests:

tests/cases/fourslash/augmentedTypesClass3Fourslash.ts
tests/cases/fourslash/commentsEnumsFourslash.ts
tests/cases/fourslash/commentsExternalModulesFourslash.ts
tests/cases/fourslash/commentsInheritanceFourslash.ts
tests/cases/fourslash/commentsInterfaceFourslash.ts
tests/cases/fourslash/commentsModulesFourslash.ts
tests/cases/fourslash/commentsMultiModuleMultiFileFourslash.ts
tests/cases/fourslash/commentsMultiModuleSingleFileFourslash.ts
tests/cases/fourslash/commentsOverloadsFourslash.ts

fourslashRunner.ts skips tests/cases/fourslash/fourslash.ts (correctly), but the regex isn't anchored, so it also skips *Fourslash.ts. It's been like that since forever:

if (justName && !justName.match(/fourslash\.ts$/i) && !justName.match(/\.d\.ts$/i)) {

Also, since there've never been any tests/cases/fourslash/*.d.ts files, and the .d.ts exemption is unique to this runner, I simplified the condition to just justName !== "fourslash.ts":

git log 'tests/cases/fourslash/*.d.ts'
# No output

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 8, 2022
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@jablko
Copy link
Contributor Author

jablko commented Apr 9, 2022

FYI: There weren't any *Fourslash.ts tests before #44652:

git log 0f216f36ec554da78793bd73a5294116000f6b57^ 'tests/cases/fourslash/*Fourslash.ts'
# No output

I applied #46703, which landed in the meantime, to tests/cases/fourslash/commentsInterfaceFourslash.ts.

@RyanCavanaugh RyanCavanaugh merged commit c1db699 into microsoft:main Apr 11, 2022
Jack-Works pushed a commit to Jack-Works/TypeScript that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants